dialog.threeWay

Syntax dialog.threeWay (prompt, button1, button2, button3)

Params prompt is a string to be displayed in the dialog .

button1 is the string with which the first button should be labeled.

button2 is the string with which the second button should be labeled.

button3 is the string with which the third button should be labeled.

Action Displays a dialog containing prompt and three buttons, labeled in accordance with the other three parameters to the verb. It then waits for the user to click on one of the buttons.

Returns A number; 1 if the first button is hit, 2 if the second button is hit, and 3 if the third button is hit.

Examples dialog.threeWay ("Terminating session. Save changes?", "Save", "Discard", "Cancel")

   » 1 // User wants changes saved.

dialog.threeWay ("How do you like your eggs?", "Over", "Hard", "Raw")

   » 3

This example returns "3" if the user clicks on the "Raw" button (in which case you may wish to have the user committed)

Notes Compare this verb to dialog.twoWay, which permits only two choices for the user and which returns true or false rather than a number.

When the three choices you intend to supply are the standard "Yes," "Cancel," and "No" options, use dialog.yesNoCancel.

button1 is always the default button. It is outlined and will be selected if the user presses Return or Enter.

The buttons appear in the opposite order from their appearance in the parameter list, with button1 (the default) in the lower right corner.

See Also dialog.twoWay

dialog.yesNoCancel

Discuss