[Vm-dev] Re: Is SmallInteger a really too dangerous class?
Mariano Martinez Peck
marianopeck at gmail.com
Tue Dec 14 19:38:42 UTC 2010
On Tue, Dec 14, 2010 at 10:18 AM, Andreas Raab <andreas.raab at gmx.de> wrote:
> 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:
Conclusion: do not program while building the christmas tree with your wife
> 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.
yes, that a good tip. Thanks
> - Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev