FutureBasic Logo

<<    Index    >> FutureBasic

alert   statement / function



Statement syntax
alert tag, style, message, informativeText, buttonTitles, sheetFlag

Function syntax
response = alert tag, style, message, informativeText, buttonTitles

Description
Use this statement/function to:
  • Create a new alert dialog;
  • Show or hide an existing alert;
  • Alter an existing alert's characteristics.

  • Parameters
    Parameter
    Description
    tag A number (1 through 1000000) that you assign when you create the alert and that you refer to when altering the alert. A negative tag hides the alert.
    style The alert style:
    NSAlertStyleWarning (default)
    NSAlertStyleInformational
    NSAlertStyleCritical
    message The alert's message text or an ErrorRef.
    informativeText The alert's info text.
    buttonTitles A semicolon-delimited string or array of button titles.
    sheetFlag A boolean value to indicate if the alert will be a sheet attached to the current output window.
    Note An alert sheet does not return a response value from the alert statement, but instead posts an _alertDidEnd event to the user on dialog function.
     
    Return value
    NSAlertFirstButtonReturn The user clicked the first (rightmost) button on the dialog or sheet.
    NSAlertSecondButtonReturn The user clicked the second button from the right edge of the dialog or sheet.
    NSAlertThirdButtonReturn The user clicked the third button from the right edge of the dialog or sheet.
    NSAlertThirdButtonReturn + n Subsequent button clicks.
     

    Dialog events
    _alertDidEnd
    _alertShowHelp

     
    Apple documentation
    NSAlert
    NSAlertDelegate