The function called to display an interface on screen.
An instance of a subclass of interface.
The generic function
is called by display to display an interface on screen.
The primary method for interface actually does the work. You can add
methods on your own interface classes for code that needs to be executed just before the interface appears, and
methods for code that needs to be executed just after the interface appears.
is called in the process of
is not called when
is displayed as a dialog. Another way to run code before it appears on screen is to supply a
This example shows how
can be used to set the initial selection in a choice whose items are computed at display-time:
(capi:define-interface my-tree ()
((favorite-color :initform :blue))
:roots '(:red :blue :green)
(defmethod capi:interface-display :after
(with-slots (tree favorite-color) self
(setf (capi:choice-selected-item tree)
(capi:display (make-instance 'my-tree))
LispWorks CAPI Reference Manual - 21 Dec 2009