Where does "class new" come from?

Tom Phoenix rootbeer at redcat.com
Tue May 16 17:46:37 UTC 2006


On 5/16/06, Torsten Sadowski <moehl at akaflieg.extern.tu-berlin.de> wrote:

> this might be a stupid question but where does the "new" class
> method come from for object instantiation because I could find it
> neither in Object nor in ProtoObject.

Mysterious, isn't it? But you can see how it happens if you select the
text "Object new" in a Workspace and choose "debug it" yellow-button
menu.

The trick is that Object class is an instance of Class, which inherits
from Behavior. So you're seeing Class(Behavior)>>new.

Hope this helps!

--Tom Phoenix



More information about the Squeak-dev mailing list