All Manuals > CAPI User Guide and Reference Manual > 10 Dialogs: Prompting for Input

10.1 Some simple dialogs

The simplest form of dialog is a message dialog, which is used to inform the user of some event, typically the end of a long operation. You can use display-message for this.

 "Finished computing the answer to everything: ~a" 41.97)

A message dialog

When you want to ensure that the messages dialog is associated with (that is, owned by) a specific pane, you can use display-message-for-pane. There is also prompt-with-message, which can be used for displaying the message in a window-modal sheet on Cocoa.

             "This function is ~S"

A second message dialog

Another simple dialog asks the user a question and returns t or nil depending on whether the user has chosen yes or no. This function is confirm-yes-or-no.

    "Do you own a pet?")

A message dialog prompting for confirmation

For more control over such a dialog, use the function prompt-for-confirmation.

CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:21