[squeak-dev] [FIX] MessageNotUnderstood: UndefinedObject>>something

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] [FIX] MessageNotUnderstood: UndefinedObject>>something

Bert Freudenberg
Hi folks,

we have all seen numerous questions from newbies like this:

On 17.06.2009, at 13:25, Bert Freudenberg wrote:
> On 17.06.2009, at 12:56, Tim Patti wrote:
>> I'm getting a debug window with MessageNotUnderstood:  
>> UndefinedObject>>binary.
>
> Which tells you that "fileHandle" is nil.

IMHO it would help if we special-cased the MNU text for a nil  
receiver. In that case, I propose the message should read

        MessageNotUnderstood: receiver of "something" is nil

which might point beginners to the actual cause.

Attaching proposed fix.

- Bert -




nilMNU-bf.1.cs.gz (592 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] [FIX] MessageNotUnderstood: UndefinedObject>>something

David T. Lewis
On Wed, Jun 17, 2009 at 01:55:24PM +0200, Bert Freudenberg wrote:

>
> we have all seen numerous questions from newbies like this:
>
> On 17.06.2009, at 13:25, Bert Freudenberg wrote:
> >On 17.06.2009, at 12:56, Tim Patti wrote:
> >>I'm getting a debug window with MessageNotUnderstood:  
> >>UndefinedObject>>binary.
> >
> >Which tells you that "fileHandle" is nil.
>
> IMHO it would help if we special-cased the MNU text for a nil  
> receiver. In that case, I propose the message should read
>
> MessageNotUnderstood: receiver of "something" is nil
>
> which might point beginners to the actual cause.

This certainly does provide a more informative message, and it is
translated to the default language, which should be helpful. I wonder
if someone with access to new users (a classroom perhaps) could try
this out on some actual naive users and see how they react?

A possible down side is that the current message serves to reinforce
the concept the everything is an object, even nil. This would be a
jarring notion to someone raised on e.g. Java. It may be a good thing
to let folks figure this out early, even if it does result in a few
more newbie questions.

I personally like the proposed change, but I really don't know if it
is a good thing or not. That's why I'm suggesting trying it out on a
few test subjects to see the reaction.

Dave