dialog.twoWay

Syntax dialog.twoWay (prompt, button1, button2)

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

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

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

Action Displays a dialog containing prompt and waits for the user to click on a button.

Returns True if the user clicks button1, false if the user clicks button2.

Examples dialog.twoWay ("How are you feeling?", "Fine", "Terrible")

   » true // User is fine.

dialog.twoWay ("Use long or short form for dates?", "Long", "Short")

   » false // Use short form for dates

Notes If the choice you wish to present to the user is a Yes-No choice, use dialog.yesNo, which automatically names the two buttons accordingly.

button1 is always the default button; it appears with an outline around it. It is automatically selected if the user presses Return or Enter.

See Also dialog.yesNo

dialog.threeWay

Discuss