[ENH] Accessor Methods for instance variables
Andrew P. Black
apb at cse.ogi.edu
Sun Apr 15 08:01:09 UTC 2001
I'm attaching an update to the "very popular" enhancement that I
wrote a year or so ago. From the preamble:
"Change Set: AccessorCodeGen
Date: 29 December 1999. Revised for 3.x, 2001.04.14
Author: Andrew P. Black
This changeset adds a menu item 'inst var accessors...' to the class
list pane in the browser.
It brings up a control panel that shows which of the instance
variables of the current
class have accessor methods ('readers' or 'writers'). It also
distinguishes simple accessors
from those that do customized actions.
Simple accessors can be removed or added to the class just by
clicking on the control panel"
I put "very popular" in quotes because as far as I know, I'm the only
person ever to have used this control panel. One of the reasons that
I like it is that it's modeless; that is, I can leave the panel up,
as a reminder of what the instance variables are in the current
class, information that is otherwise not visible in the standard
browser. It is in whisker, of course.
Right now, the link between the control panel and the class is one
way: clicking in the control panel creates or deletes a method, but
deleting a method (in a browser, say) does not cause the control
panel to update. I'm seeking advice on how to make this work.
I have thought about writing a step method for the control panel,
which might get control every few seconds. But then what? Is there
a fast way of checking to see when the methods of class were last
changed? I really don't want to have to re-examine the method bodies
every few seconds
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AccessorCodeGen.1.cs
Type: application/octet-stream
Size: 15870 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20010415/41a9b4c5/AccessorCodeGen.1.obj
More information about the Squeak-dev
mailing list
|