overridding constructor...how to?

Wolfgang Helbig helbig at lehre.ba-stuttgart.de
Fri Mar 10 01:02:28 UTC 2006


> hi all,
>   in order to override a constructor for my objects, in order to make some initializzation of instance variables, what i have to do? Defining a new methods seems not to work... what i'm doing wrong? Where i can find a useful reference about squeak programming? thanks in advance,
>   
> nelson

You can use any class method to create an instance of yout class. For
examples have a look in the system browser Graphics-Display Objects |
Cursor class | instance creation | new" which overrides the new method.
I learned this from Adele Goldberg, "Smalltalk-80 The Language", most of
this 1989 book is still valid in Squeak.

hope this helps,

Wolfgang



More information about the Squeak-dev mailing list