Recursive #doesNotUnderstand:

Stephen Pair spair at advantive.com
Thu Aug 16 18:14:24 UTC 2001


It seems kind of harsh that Squeak crashes on a recursive
#doesNotUnderstand: (when an object (a subclass of nil) does not
understand #doesNotUnderstand:).

Would it not be better to lookup #doesNotUnderstand: on ProtoObject in
that case?  You could even make ProtoObject>>doesNotUnderstand: detect
that it has received a DNU for a DNU and create a sensible error message
(like, "you need to at least implement #doesNotUnderstand: in your nil
subclass").  If we don't find DNU on ProtoObject...well, then I'd say it
would be ok to give up...there are probably bigger issues to worry about
anyway.

- Stephen





More information about the Squeak-dev mailing list