Objects displayed by the Snooper can be assigned to global variables. These objects can then be used in expressions in any workspace or in a built-in evaluation pane of the Snooper.
By evaluating expressions referring to an object, sending it various messages, observing their effect, and inspecting returned values, a user can learn more about objects which have been discovered using the basic snooping operations.
The Snooper uses the global variable names X, Y, Z, and S. It uses single-letter variable names for convenience and to avoid conflicts (most programs are likely to use more descriptive names for their global variables).
To assign an object to X:
The variable X in any workspace will now refer to the object that was selected.
To capture up to three objects as X, Y, and Z:
The global variable X will now refer to the first selected object; Y will refer to the second selected object, if there were two or three (otherwise it will be undefined); and Z will refer to the third selected object, if there were three (otherwise it is undefined).
To assign any number of objects to an array called X:
X will now refer to an array containing all of the selected objects.
To set the Snooper so that whenever an object is selected, it is assigned to S:
(Note: This is very dangerous -- it is far too easy to get confused about what item is currently referred to by S -- but it is useful on occasion).