[squeak-dev] Menu bar (was: The Trunk: Morphic-kb.240.mcz)

Balázs Kósi rebmekop at gmail.com
Fri Nov 20 13:41:08 UTC 2009


Hi,
> However, I'm wary of storing blocks in the menu items.
>
> The canonical style is to store a receiver and a message, which leads to far less complications down the road. That's why in the menu item we have target, selector, and arguments instance variables, instead of a block.
Doesn't the new closure blocks mitigate those problems? Can you elaborate a bit?
Blocks are so much more convenient.

> Also, I'd rather move the updating behavior into the submenu itself. It doesn't really make sense to reserve an inst var in every menu item, plus a top-level menu might need updating too, not just a sub menu.
>
> In fact, looking at it, I'm not the first with this idea :) There is an UpdatingMenuMorph for exactly that purpose.
It don't think that this was its exact purpose, but I hijacked it:
Morphic-kb.242 in The Inbox.
What do you think?

Balázs



More information about the Squeak-dev mailing list