class instance variables
Bob Arning
arning at charm.net
Fri May 11 16:31:38 UTC 2001
Yanni,
Are you specifically trying to do things programmatically? All you really need to do is open a browser on the class, click on the 'Class' button and the text will be there in the code pane for you to edit:
SomeClass class
instanceVariableNames: ''
Fill in the variable name and accept the changes. From that point you can reference the variable normally.
Cheers,
Bob
On Fri, 11 May 2001 12:23:26 -0400 Yanni Jew <yanni at home.com> wrote:
>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?
More information about the Squeak-dev
mailing list
|