[Newbies] Howto initialize class variables
Randal L. Schwartz
merlyn at stonehenge.com
Sat Mar 20 14:46:12 UTC 2010
>>>>> "Alex" == Alex Schenkman <alex at schenkman.info> writes:
Alex> Bert your are super!
Alex> * never call "super initialize" on the class side
Alex> Why? I thought it was "polite" to do it, =)
It breaks things by double initializing them.
The code loaders run initialize automatically. So when the parent
class was loaded, it was already initialize. You've just asked it
to do that again.
On the *instance* side, you *must* call super initialize, because
you don't get another chance to do that.
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
More information about the Beginners