NextPrevUpTopContentsIndex Example

Consider the following example, where a closure is defined:

(let ((test-button (make-instance 'capi:button)))
  (defun is-button-enabled ()
    (capi:button-enabled test-button)))

This has defined the function is-button-enabled , which is a closure over the variable test-button , where the value of test-button is an instance of the capi:button class.

  1. Enter the definition of the closure shown above into a Listener.
  2. Choose Values > Inspect .
  3. The Inspector examines the symbol is-button-enabled .

  4. Click on the FUNCTION item to select the closure.
  5. Choose Slots > Inspect to inspect the selected item.

The closure is inspected.

Common LispWorks User Guide (Macintosh version) - 11 Apr 2005