with-dialog-results is designed to evaluate the
in a special way to allow dialogs on Cocoa to use window-modal sheets. It is not needed unless you want to make code that is portable to Cocoa. The
should be a function call form that displays a dialog.
with-dialog-resultsmacro waits until the dialog has been dismissed and then evaluates the body forms.
with-dialog-resultsmacro returns immediately. The body forms are evaluated when the user dismisses the sheet.
is called with all the given
, plus an additional pair of arguments,
:continuation and a continuation function created from
. In the first format, the additional arguments are placed after all the given
. In the second format, the additional arguments are placed just before the last of the given
(i.e. before the list of remaining argument to
This macro is designed for use with
s such as popup-confirmer or prompt-for-string, which take a
:continuation keyword. You can define your own such functions provided that they call one of the CAPI functions, passing the received
On Microsoft Windows, GTK+ and Motif, this displays a dialog, calls
record-label-in-database when the user clicks OK and then returns. On Cocoa, this creates a sheet and returns;
record-label-in-database will be called when the user clicks OK.
Here is an example with skeleton code for using
with-dialog-results. Note that the dialog function (
choose-file below) that is called by
with-dialog-results must take a
keyword argument and pass it to a CAPI prompting function. Also note that the call to the CAPI prompting function must be the last form in the dialog function. Forms after the CAPI prompting function will be executed at an indeterminate time, and their values will not be used in the body of
CAPI User Guide and Reference Manual (Macintosh version) - 25 Feb 2015