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.
"This function is ~S"
Figure 11.2 A second message dialog
Another simple dialog asks the user a question and returns
nil depending on whether the user has chosen yes or no. This function is 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) - 25 Feb 2015