[squeak-dev] Is there a pull-right hierarchical menu in Squeak?

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Fri Jun 5 11:31:03 UTC 2020


> On my list of things to attack one day is cleaning up the horrendous mess of menu building via toolbuilder. Maybe by the time I get to it somebody else will have solved it for me.

I'm currently working at a new PluggableMenuButtonMorph where I am dealing with similar design decisions in the ToolBuilder. Let's exchange some ideas before we start reinventing the same wheel from different sides. :-)


________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von tim Rowledge <tim at rowledge.org>
Gesendet: Montag, 1. Juni 2020 20:04:16
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] Is there a pull-right hierarchical menu in Squeak?



> On 2020-05-31, at 11:53 PM, Marcel Taeumel <marcel.taeumel at hpi.de> wrote:
>
> If you are using ToolBuilder directly to construct menus (i.e. PluggableMenuSpec), there is -- unfortunately -- no way to add sub-menus. However, almost all tools that go through ToolBuilder construct their menus via a callback from the actual widgets (e.g., PluggableListMorph in Morphic, PluggableListView in MVC), which then arrives as "someMenu" in your model's menu-construction method. That "someMenu" will then be a MenuMorph (in Morphic) or CustomMenu (in MVC). See above for that case. :-)

On my list of things to attack one day is cleaning up the horrendous mess of menu building via toolbuilder. Maybe by the time I get to it somebody else will have solved it for me.
>
> That latter, most frequent way, to construct menus does not add sub-menus but this .... very special ;-) ... "more..." menu item at the end of the list.

... which is possibly the nastiest way one could do it. If you have to have menus with more than ~9 items, a well thought out hierarchical menu is the least awful approach. If you arrange for it to work well then it is possible to make even complex hierarchies seem natural; see for example, how RISC OS does the job.

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
C for sinking, java for drinking, Smalltalk for thinking



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200605/a37a09d3/attachment.html>


More information about the Squeak-dev mailing list