Adding and removing methods
Ken Causey
ken at kencausey.com
Tue Mar 16 22:09:08 UTC 2004
Yes. However, please note that starting with Squeak 3.7a Behaviour>>new
does just exactly this and this particular example is no longer a good
example of a custom new method. At least not one that you would any
longer need to actually use.
Ken
On Tue, 2004-03-16 at 16:01, Brian Murphy-Dye wrote:
> Jules,
>
> As Lex states, it isn't an error to override new. The warning is just a
> caution that improperly overriding it may prevent creations of new
> instances of that class.
>
> A common reason to override new is to run an initialization routine
> after instance creation:
> new
> ^ self basicNew initialize
>
> Brian.
-------------- 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/20040316/b1d27837/attachment.pgp
More information about the Squeak-dev
mailing list
|