Extending a Class by adding an Instance Variable
SmalltalkVimMode adds an instance variable to RubSmalltalkEditor so it can track whether it is in normal/insert mode, etc. Currently, the inst var is undeclared when the project is loaded and one has to manually edit the class def to add it. Is there an elegant way to handle this? I can't think of a way that isn't awkward, dirtying packages, or leaving zombie objects around when editors close... ----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html
So far we do not have instance variable extensions. Now what could be done is to have a dictionary of properties in RubSmalltalkEditor and like that method extensions could use it. We can integrate the extension.
On 2 Feb 2020, at 05:21, Sean P. DeNigris <sean@clipperadams.com> wrote:
SmalltalkVimMode adds an instance variable to RubSmalltalkEditor so it can track whether it is in normal/insert mode, etc. Currently, the inst var is undeclared when the project is loaded and one has to manually edit the class def to add it.
Is there an elegant way to handle this? I can't think of a way that isn't awkward, dirtying packages, or leaving zombie objects around when editors close...
----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html
participants (2)
-
ducasse -
Sean P. DeNigris