prompt-for-confirmation
message
&key
screen
owner
cancel-button
default-button
=>
result
,
successp
The function
prompt-for-confirmation
displays a dialog box containing
message
, with
Yes
and
No
buttons. When either
Yes
or
No
is pressed, it returns two values:
a boolean indicating whether Yes was pressed
t
(for compatibility with other prompt functions)
cancel-button
specifies whether a
Cancel
button also appears on the dialog. When
Cancel
is pressed,
abort
is called and the dialog is dismissed. The default value of
cancel-button
is
nil
.
default-button
specifies which button has the input focus when the dialog appears (and is thus selected when the user immediately presses
Return
).The value
:ok
means
Yes
, the value
:cancel
means
Cancel
, and any other value means
No
. The default value of
default-button
is
nil
.
owner specifies an owner window for the dialog. See the "Prompting for Input" chapter in the LispWorks CAPI User Guide for details.
(capi:prompt-for-confirmation "Continue?")
(multiple-value-bind (res success)
(capi:prompt-for-confirmation "Yes, No or Cancel"
:cancel-button t)
(if success
res
(abort)))