6 The Inspector
With the definitions made in Chapter 5, "The Class Browser", or with the file animals.lsp
loaded, consider the following example:
CL-USER 11 > (make-instance 'dog) #<DOG 006089FC> CL-USER 12 >Now follow the instructions below:
1. Select Copy from the Listener's Edit menu
The object created is copied into the clipboard.
2. Select Inspector from the Lisp sub-menu of the Works menu
When first invoked, the inspector is empty.
3. Select Paste from the inspector's Edit menu
The instance of class dog
is pasted into the inspector, and inspected automatically.
Note: You can do this even more simply using the Listener's Value menu. See Chapter 10, "The Listener" for details.
Figure 6.2 Inspection of an instance of the dog
class.
The View menu lists a number of display options depending upon the object inspected. These options provide different ways of viewing the object. In the case of the dog
object, the views available are one of all of its slots, including those inherited, or simply its own, local slots.
4. Select LOCAL-SLOTS from the View menu.
Figure 6.3 Inspection of an instance of dog
showing only non-inherited slots.
Because the barks
slot is the only slot defined locally for a dog
, it is the only one listed.
Generated with Harlequin WebMaker