Question on where the new method is define

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Question on where the new method is define

Mitt Cooper
I'm very new to smalltalk and squeak.  I'm having trouble  
understanding where/how is the "new" method is defined.

I was messing around with morphs; I tried CurveMorph new.  Nothing  
happened so I started walking back through the parents of CurveMorph  
looking for the method "new".  I got all the way to the top  
(ProtoObject) and to my bewilderment... no "new".   I used the method  
finder and found the "new" method in the Behavoir class.   How are  
these related?  It seems like something with a class being a real  
object and descending from behavior, but I can't seem to wrap my mind  
around that.  Any help and insights would be appreciated.

Thanks.
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Question on where the new method is define

stephane ducasse

On 15 nov. 06, at 01:37, Mitt Cooper wrote:

> I'm very new to smalltalk and squeak.  I'm having trouble  
> understanding where/how is the "new" method is defined.



>
> I was messing around with morphs; I tried CurveMorph new.

CurveMorph new openInWorld


> Nothing happened so I started walking back through the parents of  
> CurveMorph looking for the method "new".  I got all the way to the  
> top (ProtoObject) and to my bewilderment... no "new".   I used the  
> method finder and found the "new" method in the Behavoir class.    
> How are these related?  It seems like something with a class being  
> a real object and descending from behavior, but I can't seem to  
> wrap my mind around that.  Any help and insights would be appreciated.

Have a look at:

http://www.iam.unibe.ch/~scg/Teaching/Smalltalk/index.html
in understanding metaclasses

>
> Thanks.
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners