prompt-for-confirmation message &key screen owner cancel-button default-button continuation => 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:
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 Dialogs: Prompting for Input for details.
If
continuation
is non-nil, then it must be a function with a lambda list that accepts two arguments. The
continuation
function is called with the values that would normally be returned by prompt-for-continuation
. On Cocoa, passing
continuation
causes the dialog to be made as a window-modal sheet and prompt-for-confirmation
returns immediately, leaving the dialog on the screen. The with-dialog-results macro provides a convenient way to create a
continuation
function.
(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)))
CAPI User Guide and Reference Manual (Unix version) - 25 Feb 2015