Using an Inspector
To open an Inspector window, you send the message inspect to the object whose contents you want to examine.
You can send the message inspect by highlighting an object or code expression, and then selecting Inspect from the Edit menu. If you inspect a code expression, the expression executes first, and the Inspector opens on the result of the expression.
1. Type the word Chooser in the Transcript or a Workspace, and highlight Chooser.
2. Select Inspect from the Edit menu. The Inspector for the class Chooser opens.
The Inspector has two panes: a
list of variables pane (left); and a
value pane (right). The list of variables includes the
Chooser object itself (self) followed by the object's instance variables.
You can also send the message inspect by adding a statement to your code that sends inspect to an object. When the code runs, an inspector opens on the object's internal state.
After you open an inspector on an object, you can do the following:
•Inspect the object's variables
•Change the values for an object's variables
•Evaluate Smalltalk expressions in the value pane
•Add and remove items from a dictionary
•Open a Basic Inspector on the inspected object
Last modified date: 03/13/2019