NextPrevUpTopContentsIndex

15.2 Examining objects

The attributes and values list is the most interesting part of the Inspector. Each item in this list describes an attribute of the inspected object by displaying its name (the first field in each entry) and the printed representation of its value (the second field). For example, the inspection of a CLOS object yields a list of its slots and their values. The description is called an inspection .

  1. Enter the following form into a Listener:
  2. (make-instance 'capi:display-pane :text "My Display Pane")
  3. Choose Values > Inspect from the Listener's menu bar, or use the keystroke Ctrl+C Ctrl+I , or click the
  4. button.

    The object you created is inspected in the Inspector.

    Figure 15.2 Examining an item in the Inspector

    When inspecting instances of CLOS classes, you can choose to display only those slots which are local to the class. By default, all slots are displayed, including those inherited from superclasses of the class of the inspected object.

  5. Click the Local Slots tab.
  6. Because the text slot is the only slot defined locally for a display-pane , it is the only one listed.

Figure 15.3 Inspector showing local slots of a CLOS instance

As well as CLOS instances, other objects including lists and hashtables have multiple views available in the Inspector. For example, a list can be viewed as a plist, alist, cons or list if it has the appropriate structure.


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

NextPrevUpTopContentsIndex