[squeak-dev] variable assignments button/hotkeys (again)

Ralph Boland rpboland at gmail.com
Wed Feb 5 21:49:29 UTC 2020


Not long ago I posted about the variable assignments button.
It generated an interesting discussion but I don't think in the end it will
result in any change to the operation of Squeak.

Let me make a slight variation on this discussion.

In the Inspector/Debugger the instance variables of  the class being
inspected are displayed in a window and any one of these variables can
be selected/inspected.
Then using a menu or hotkey one can invoke:
         StringHolder>>browseVariableReferences
              or
         StringHolder>>browseVariableAssignments

These commands bring up a selection window where one chooses one of the instance
variables of the class of the selected variable.  Then  one of the
methods above is invoked
on the instance variable you chose.

This was counterintuitive to me so I added two new menu-items/hotkeys:

        ('selected variable references... (u)'
browseSelectedVariableReferences)
                     and
        ('selected variable assignments... (A)'
browseSelectedVariableAssignments)

These commands act like the cooresponding previous commands except that,
instead of bringing up a selection window for the user to select the
variable to use,
the selected variable of the class being inspected is used (and the class being
inspected is used instead of the class of the selected variable).

This feature is more intuitive to me and I have found it quite useful.

I have attached the necessary code as .st files in case anybody would like to
try it out.  These are filed out from Linux but I assume they load as
is to Windows or Mac.
Feel free to make any changes you feel necessary and if it gets added to the
next version of Squeak, great!

If you try it out let me know what you think.

Thanks for reading

Ralph Boland  rpboland at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: InspectorRalphBoland.st
Type: application/octet-stream
Size: 2665 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200205/9ecef9c7/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Inspector-*RalphBolandEnvironment.st
Type: application/octet-stream
Size: 669 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200205/9ecef9c7/attachment-0001.obj>


More information about the Squeak-dev mailing list