Question about initialize

goran.krampe at bluefish.se goran.krampe at bluefish.se
Tue Nov 23 10:07:56 UTC 2004


"Joseph Frippiat" <frippiat.j at kst.be> wrote:
> Hi,
> 
> What is the utility to have 2 initialize methods, one for the class and one
> for the instance.  When are they called ?

Class side initialize is called upon filein etc. When the class is
installed into the image. It typically sets up Class state, like
constants and so on.

Instance side is for every created instance and sets the instance vars
to something proper. It is called automatically btw in Squeak nowadays.

Btw, check out the Smalltalk free books:
	http://www.iam.unibe.ch/~ducasse/FreeBooks.html

> Thanks
> 
> Joseph

regards, Göran



More information about the Squeak-dev mailing list