[Q]Overriding "new"

Bob Arning arning at charm.net
Tue Mar 19 22:16:20 UTC 2002


On 19 Mar 2002 20:14:32 +0100 Martin Drautzburg <martin.drautzburg at web.de> wrote:
>What is the problem with overriding the Class method "new".

The problem is that it's real easy to make a painful mistake when you do, so there is a bit of a warning. 

>Squeak
>always warns me, and if I insist terrible things happen (low memory -
>crash).
>
>I was subclassing Array2D and I gave it a Class Method
>        new
>                ^ super width:3 height:3
>
>which was obviously a bad idea, but why ?

It works for me. Must be something you haven't mentioned.

Cheers,
Bob




More information about the Squeak-dev mailing list