NextPrevUpTopContentsIndex

10.3.2 A dialog which is window-modal on Cocoa

To create a dialog which is window-modal on Cocoa, call the dialog function inside the macro with-dialog-results as in this example:

(with-dialog-results (symbol okp)
    (prompt-for-symbol
     "Enter a class-name symbol:"
     :ok-check #'(lambda (symbol)
                   (find-class symbol nil)))
  (when okp
    (capi:display-message "symbol is ~S" symbol))
)

On Microsoft Windows and Motif, this displays the dialog, calls display-message when the user clicks OK , and then returns. The effect is no different to what you saw in Prompting for Lisp objects.

On Cocoa, this creates a sheet and returns. display-message is called when the user clicks OK . The sheet is window-modal, unlike the sheet you saw in Prompting for Lisp objects.

For more details, see the page for with-dialog-results in the LispWorks CAPI Reference Manual .


LispWorks CAPI User Guide (Unix version) - 17 Mar 2008

NextPrevUpTopContentsIndex