[squeak-dev] TheWorldMenu>>newMorphOfClass:event: - a bug and a fix

karl ramberg karlramberg at gmail.com
Sun Mar 5 10:57:43 UTC 2023


Hi,
I think it was a conscious choice that debugAction doesn't send an event.

But the change set in attachment will send the event from the debugAction
menu item and you can proceed the debugger.

Best,
Karl


On Sat, Mar 4, 2023 at 2:46 PM Eduardo Ochs <eduardoochs at gmail.com> wrote:

> Hi all,
>
> this is my first bug report, and my proposal for how to fix it is
> probably too naive... please discuss and rewrite.
>
> Take a menu item - for example, this one,
>
>   World -> new morph... -> from alphabetical list -> L-N -> LineMorph
>
> and put it in the variable itemLineMorph. Then run:
>
>   itemLineMorph debugAction.
>
> On the debugger, click "proceed". You will get an error a few steps
> ahead, in this method:
>
>   TheWorldMenu >> #newMorphOfClass:event:
>
> the "evt hand" will fail because evt is nil. One fix is to replace the
> "evt hand" in TheWorldMenu>>#newMorphOfClass:event: by:
>
>   (evt ifNotNil: [evt hand] ifNil: [nil currentHand])
>
> Note that that bug is also triggered when we run debugAction from
> the halo. See these two messages:
>
>
> http://lists.squeakfoundation.org/pipermail/squeak-dev/2023-March/223616.html
>
> http://lists.squeakfoundation.org/pipermail/squeak-dev/2023-March/223617.html
>
>   Cheers,
>     Eduardo Ochs
>     http://anggtwu.net/eev-squeak.html
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20230305/507ce722/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MenuItemMorph.kfr.1.cs
Type: application/octet-stream
Size: 800 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20230305/507ce722/attachment.obj>


More information about the Squeak-dev mailing list