[squeak-dev] Menu bar (was: The Trunk: Morphic-kb.240.mcz)
Bert Freudenberg
bert at freudenbergs.de
Fri Nov 20 11:15:49 UTC 2009
On 20.11.2009, at 04:43, commits at source.squeak.org wrote:
>
> Name: Morphic-kb.240
> Author: kb
> Time: 20 November 2009, 1:40:40 am
> UUID: 3f82a1c6-ee8f-bf4b-98cc-a2ef45557219
> Ancestors: Morphic-kb.239
>
> - Refactoring of TheWorldMainDockingBar
> - Added some helper methods to MenuItemMorph, MenuMorph, DockingBarMorph
> - Added a menu to the docking bar listing windows not collapsed
Very neat! I like the menu bar :)
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.
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.
- Bert -
More information about the Squeak-dev
mailing list
|