|
From: | Paolo Bonzini |
Subject: | Re: [Help-smalltalk] Re: Using Smalltalk as a scripting language |
Date: | Sat, 31 Oct 2009 15:31:14 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20091014 Fedora/3.0-2.8.b4.fc11 Lightning/1.0pre Thunderbird/3.0b4 |
On 10/31/2009 01:57 PM, Roland Plüss wrote:
> No, you declared the Smalltalk struct incorrectly.What did I do wrong there?
You omitted all the variables that are part of every class. Try "Class allInstVarNames".
Maybe I need to do a hack then by having a class side object which just holds a pointer ( not the variable itself ).
No, why?Note that singletons can always be broken. #initialize can be broken with #basicNew. In fact, everything in Smalltalk can be broken, since there are no private methods. But I wouldn't worry about that.
Now that I understand more, anyway, I agree that the best thing to do is what you were doing in the beginning---but with the class variable names declared correctly based on the output of "Class allInstVarNames".
If you have problems, you can also consider going on the #gnu-smalltalk IRC channel on freenode.net.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |