[Vm-dev] Re: Is SmallInteger a really too dangerous class?
andreas.raab at gmx.de
Tue Dec 14 09:18:06 UTC 2010
On 12/14/2010 1:09 AM, Igor Stasenko wrote:
>>>> Notice I want to add a class variable to SmallIneteger, not instVar.
>>> This is not really a VM question. Class variables are held in a
>>> dictionary. The VM knows nothing about this.
>> And of course class vars are added by using #addClassVarName: not
> class inst var should be ok too. Not sure what the correct message for
> adding it programmatically.
Obviously that would be "self ->class<- addInstVarName:
BTW, you do realize that you can try all of this right in the browser,
no? All you need is to go to class SmallInteger and edit the class
definition. Then you can see whether it is possible to add instance
variables (it's not), class variables (works fine), or class instance
variables (works fine, too). And once you've tried this it should be
pretty obvious that your code is broken and not the VM and/or ClassBuilder.
More information about the Vm-dev