class instance variables

Sarkela sarkela at home.com
Fri May 11 17:59:22 UTC 2001


Juanita Ewing wrote a very concise article on using Class variables
and Class Instance variables. If you go to the publications page
at Instantiations,
    http://www.instantiations.com/sts/pubs.htm
You will find a paper entitled, "How to use Class Variables and
Class Instance Variables." The paper is clear and gives the
criteria for when to use each. A good reference.

John Sarkela


> 
> 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