A beginner's question regarding Inside Smalltalk vol II
Kevin Driedger
kdriedge at crosskeys.com
Tue Feb 24 18:50:01 UTC 1998
Is #initialize a class method or an instance method?
If it is a class method usually the person puts something like:
------cut here----
initialize
"MotherDuck initialize"
"rest of the code goes here"
----cut here----
If it is an instance method one of the superclasses class methods #new would
look like the following:
"This method creates a new instance of the receiver."
^super new initialize.
which would then call your instance method.
]{evin.
> -----Original Message-----
> From: Philippe de Rochambeau [SMTP:pr1 at club-internet.fr]
> Sent: Tuesday, February 24, 1998 6:58 AM
> To: Squeak
> Cc: "recipient.list.not.shown"; @cs.uiuc.edu at nfsbrute
> Subject: A beginner's question regarding Inside Smalltalk vol II
>
> Please disregard my previous questions regarding the first example (page
> 16)
> in Wilf LaLonde's book. I have solved most of them except one:
>
> - the MotherDuck class has a method called "initialize". However, at no
> point
> in the code is that method called. Why? Does the MotherDuck class have an
> ancestor that calls "initialize" when "new" is used?
>
> Does anyone know Wilf LaLonde e-mail address?
>
> Many thanks.
>
> Philippe de Rochambeau
More information about the Squeak-dev
mailing list
|