Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Inspector
Last updated at 11:22 am UTC on 16 May 2017
The Inspector is an essential Smalltalk tool. It is used to inspect the contents (instance variables) of a live object. You can also use it to send messages to an object.

To open an inspector, highlight an object or snippet of Smalltalk code in a Workspace or other text window, and select "inspect it" from the pop-up menu. (or use alt-i)

For example, open a Workspace and type 3@4 into it, then highlight this text and "inspect it".

This will open an inspector window on the object, with the object's instance variables in a column on the top-left, a variable display area on the top-right, and a code area on the bottom. In this code area, you can send messages to the object, by entering something like self printString or self printString asSortedCollection and then alt-p or alt-i.

Uploaded Image: Point.gif

An object with an open Inspector will not be garbage collected.](Note that the "chase pointers" feature [of the Inspector] can be misleading as it is assumed that for this feature you are interested in "all but" the reference paths starting from the inspector you hold).

In recent version of Squeak you may drag out a field from the list in the inspector and drop it into a Workspace to get a reference to it there.

The Object Explorer is a newer hierarchical alternative to the traditional Inspector.