NextPrevUpTopContentsIndex

prompt-for-confirmation

Function
Summary

Displays a dialog box with a message and Yes and No buttons.

Package

capi

Signature

prompt-for-confirmation message &key screen
owner cancel-button
default-button => result , successp

Arguments

message

A string.

screen

A screen.

owner

An owner window.

cancel-button

A boolean.

default-button

A keyword, or nil .

Values

result

A boolean.

successp

A boolean.

Description

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.

Example
(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)))
See also

confirm-yes-or-no


LispWorks CAPI Reference Manual - 11 Apr 2005

NextPrevUpTopContentsIndex