All Manuals > LispWorks IDE User Guide > 2 A Short Tutorial

NextPrevUpTopContentsIndex

2.5 Inspecting objects using the Inspector

The variables *, **, and *** hold the results of expressions which have been evaluated in the Listener. * always holds the result of the last expression evaluated; ** holds the previous value of *, and *** holds the previous value of **. These variables (* in particular) are not only useful in their own right; the environment uses them to pass values between different tools.

  1. Make sure the Listener tab is visible, and type *.
  2. If you have followed this tutorial so far, the text input pane object that you created above is returned. This is because the capi:contain function returns the object that is being contained. You can easily inspect this object more closely in the Inspector tool.

  3. Choose the menu command Values > Inspect .
  4. This creates an Inspector tool which displays the capi:text-input-pane object currently contained in *.

    Figure 2.5 Examining a text input pane in the Inspector

    The commands in the Values menu always act upon the current value of *. This enables you to pass a value easily from one tool to another.

    The main part of the Inspector is a list of all the slots in the object being inspected. This list shows both the name of each slot and its current value. Above this list is a button labeled Filter with a text box to its right. This lets you filter the information shown in the main list, which can be useful when you are inspecting objects with a large number of slots. The name of the object being inspected appears immediately below the echo area.

  5. Click in the Filter text box, type the word text.
  6. This restricts the display in the Inspector to only those items which contain the string "text", either in the slot name or in the slot value.

    After using the filter, you can easily see that one of the available slots contains the word hello that you typed into the text input pane.

    The Inspector always displays the actual instantiation of a given object (as opposed to a copy of it), so that you can be certain that any changes to the object itself are reflected in the Inspector.

  7. Display the text input pane that you created earlier.
  8. If you can no longer see it, choose Window > Container ; this is a simple way to display any of the windows and tools that you have created so far. (There are actually two windows with this name; if you choose the wrong one first of all, then just choose the other one.)

  9. Click in the text input pane and delete the word hello. Type goodbye and press Return.
  10. Select the Inspector to make it the active window and choose Window > Refresh .
  11. The description of the text slot now reflects the new value you specified.

  12. Close the Inspector by Command+W or by choosing Window > Close Window .

You can close any window in the environment in this way, although there are often other ways of closing windows.


LispWorks IDE User Guide (Macintosh version) - 13 Sep 2017

NextPrevUpTopContentsIndex