[Cuis-dev] WorldMenu

Hilaire Fernandes hilaire at drgeo.eu
Sat May 28 10:39:19 PDT 2022


My sentence was hard to understand, it should read:

    Another interest of the builder is to have just one pragma
    (<worldMenu>) or method name (#worldMenuSpec: aBuilder) for the
    whole menu hierarchy *(including menu and submenus definition)*, and
    a different *symbol *name for each menu and submenus.

Thinking about this, you can't define all the menus with several methods 
sharing the same name (here in the example worldMenuSpec:), the methods 
will have to be spread in different classes, not practical. Now I 
understand very clearly why the author of the Pharo menu registry used 
pragma to select the methods providing the menu definition.

Oh by the way, pragma are discoverable as easily as method implementors 
can be:

Smalltalk browseAllSelect: [:m| m pragmas anySatisfy: [:p | p key = 
#primitive:]].  (Hernan courtesy)

Hilaire

Le 28/05/2022 à 11:23, Hilaire Fernandes a écrit :
> Another interest of the builder is to have just one pragma 
> (<worldMenu>) or method name (#worldMenuSpec: aBuilder) for the whole 
> menu hierarchy, and a different name for each menu and submenus.

-- 
GNU Dr. Geo
http://drgeo.eu
http://blog.drgeo.eu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220528/1d42096f/attachment-0001.htm>


More information about the Cuis-dev mailing list