class instance variables

Yanni Jew yanni at home.com
Fri May 11 16:23:26 UTC 2001


Is there ready to use support for class instance variables in Squeak?
Are they a good or bad concept (please comment)?
I often used them, in VSE, for framework stuff.

I've messed with things to get what I want, but I was wondering if
there's some standard protocol.

Here's what I did:
    SAActiveObject class addInstVarName: 'StateModel'.

Then added an instance method:
    SAActiveObject>>stateModel
        ^self class instVarAt: 12

which is needed because the compiler doesn't know about the new
variable. Obviously, using #instVarAt: on the class is not a
portable way to do things. Any suggestions?

-yanni





More information about the Squeak-dev mailing list