popup

show popup dialog with given title and message and return result


Parameters

popup title :string
      message :string

Attributes

infoshow informational popup
warningshow popup as a warning
errorshow popup as an error
questionshow popup as a question
okshow an OK dialog (default)
okCancelshow an OK/Cancel dialog
yesNoshow a Yes/No dialog
yesNoCancelshow a Yes/No/Cancel dialog
retryCancelshow a Retry/Cancel dialog
retryAbortIgnoreshow an Abort/Retry/Ignore dialog
literalreturn the literal value of the pressed button

Returns

  • :logical
  • :literal

Examples

copy
popup "Hello!" "This is a popup message" ; shows a message dialog with an OK button ; when the dialog is closed, it returns: true

copy
if popup.yesNo "Hmm..." "Are you sure you want to continue?" [ ; a Yes/No dialog will appear - if the user clicks YES, ; then the function will return true; thus we can do what ; we want here ]

copy
popup.okCancel.literal "Hello" "Click on a button" ; => 'ok (if user clicked OK) ; => 'cancel (if user clicked Cancel)

Related