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

NextPrevUpTopContentsIndex

11.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.

(display-message "Hello world")

Figure 11.1 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.

(display-message
             "This function is ~S"
             'display-message)

Figure 11.2 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.

(confirm-yes-or-no
    "Do you own a pet?")

Figure 11.3 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) - 3 Aug 2017

NextPrevUpTopContentsIndex