Changing variables
You can change the value of some inspected object's instance variables directly in a inspector.
For example, when you inspect the statement 1 to: 100 by: 20, self resolves to Interval(1 21 41 61 81 ). If you select the variable by, change the displayed value of 20 to 10, and then save the change, self resolves to Interval(1 11 21 31 41 51 61 71 81 91 ).
Similarly, when you inspect the statement CwMessagePrompter new title: 'Prompt', the value for cwTitle is the string 'Prompt'. If you evaluate self prompt in the value pane, the following message prompter opens:
Prompter
If you change the value for cwTitle to 'New Title', then evaluate self prompt again, the title of the message prompter changes to the following:
Prompter with new title
The ability to change an object simply by changing the values of its instance variables is unique to Inspectors. Usually, you must send the object a message to change it.
Be careful, though, about the kinds of objects you try to change in an Inspector. For example, you should not attempt to change a class by changing its class instance variables in an inspector, because the inspector cannot recompile the class.
Last modified date: 03/13/2019