Dog class>>newWhite
"Returns a new white instance of receiver."
^self new
color: Color white;
yourself
is equivalent to
Dog class>>newWhite
"Returns a new white instance of receiver.���
| instance |
instance := self new.
instance color: Color white;
^ instance
So this is really when you do not know what a subclass may do with reimplementing color:
so yourself make sure that your extenders can be doing crazy things, your job is good.
S.
--------------------------------------------
St��phane Ducasse
03 59 35 87 52
Assistant: Aurore Dalle
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley,
Parc Scientifique de la Haute Borne, B��t.A, Park Plaza
Villeneuve d'Ascq 59650
France