Where does "class new" come from?

Ken Causey ken at kencausey.com
Tue May 16 17:49:15 UTC 2006

You can investigate this in a couple of ways.  First of all you could
open a Method Finder or Message Names and search for all implementors of
'new'.  However there's quite a lot of them.  One thing you will notice
however is that pretty much every implementation is on the class side.
This should clue you in to the fact that in general you are sending the
'new' message to a Class object, in other words an instance of the class

Find Class in a browser and then choose 'Browse Protocol' from the
context menu from the pane that lists the class names.  Looking through
the categories you will find 'instance creation' and selecting that
gives you a list including 'new (Behavior)'  The name in parentheses is
the class on which this method is defined and selecting this in the list
gives you the implementation.


On Tue, 2006-05-16 at 19:32 +0200, Torsten Sadowski wrote:
> Hello,
> 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. I just wanted to find out where "initialize" is called
> and what else might be done at object creation but now I'm completely
> baffled.
> Cheers, Torsten
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20060516/b0d156d1/attachment.pgp

More information about the Squeak-dev mailing list