[Q] MenuMorph add:subMenu: trouble
Bob Arning
arning at charm.net
Sun Jul 23 02:56:49 UTC 2000
On Sat, 22 Jul 2000 15:50:16 -0700 (PDT) Aaron Thieme <ghede at well.com> wrote:
>.... I get an error when the menu is instantiated (not when it's being
>created!). Digging showed the problem to be that the MenuItemMorph titled
>'sub...' has no arguments; there's an iterating block context (over the
>items in the main menu) in something like "instantiateInView"
Would that perchance be #setInvokingView: ? If so, here are some thoughts:
"Re-work every menu item of the form
<target> perform: <selector>
to the form
<target> perform: <selector> orSendTo: <invokingView>.
This supports MVC's vectoring of non-model messages to the editPane."
I haven't found this to be particularly helpful since I am generally very careful about setting the target/action of each menu item the way I want it and preferring it to stay that way. One way you can avoid this behavior is to use DumberMenuMorph in place of MenuMorph - that is the sole reason for Dumber's existence.
> that assumes
>that "item arguments" will return a collection. In my case, for whatever
>reason, arguments is nil and I get an error.
Cheers,
Bob
More information about the Squeak-dev
mailing list
|