alert
BUTTONS
,
TEXT

The alert statement displays a modal alert window with a message and one or more buttons.


Parameters

This statement has two parameters:

buttons – a comma separated list of buttons to include in the alert. The buttons must be listed in reverse order – the first button listed will be on the right and will be the default button if the Enter or Return key is pressed.

text – is the message to display.


Description

The alert statement displays a modal alert window with a message and one or more buttons. This example displays an alert with three buttons.

alert "Yes,No,Maybe","Do you want to continue?"
if info("dialogtrigger") = "No"
    stop
endif
if info("dialogtrigger") = "Maybe"
    if rnd() > 0.5
        stop
    endif
endif
...
...
...

The procedure pauses until one of the buttons is clicked. As shown above, the procedure can use the info(“dialogtrigger”) to find out which button was clicked.

Note: Pressing the Enter or Return key is the same as clicking the first button (the button farthest to the right). If the alert contains a Cancel button, pressing the ESC button is the same as clicking on the Cancel button. If there is no Cancel button, the ESC key is ignored.

LEGACY RESOURCE NUMBER COMPATIBILITY

In Panorama 6.0 and earlier the first parameter of the alert statement was a resource number instead of a list of buttons. Panorama contained a number of internal resources that could be used with this statement. For compatibility with existing databases, the alert statement correctly handles resource numbers that were internal to earlier versions of Panorama (1000, 1001, etc.). Your own custom resources, however, are not supported. Code that uses custom resources must be rewritten for compatibility.


See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0 but does not have 255 character limit, and automatically grows in height to accommodate the specified text.