Shouldn't this code

> So if you implement a #newWhite method in the "class side" of Dog, it
> would be something like this. 
> 
> Dog class>>newWhite
>   "Returns a new white instance of receiver."
>   ^self new color: Color white

be this instead?

> Dog class>>newWhite
>   "Returns a new white instance of receiver."
>   ^self new 
>     color: Color white;
>     yourself

in order to return the new Dog instance?  Otherwise it will return the Dog
class itself (not what you expected?

-t



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply via email to