[Pharo-project] Menu creation and invocation
alain.plantec at yahoo.com
Fri Feb 18 13:36:28 CET 2011
We have to specify where to search for the pragmas in order
to be able to use the same menu pragma keyword in different contexts.
I can't dig into it now but this is the idea.
Le 18/02/2011 11:41, Henrik Johansen a écrit :
> If I understood him correctly, essentially, you limit the scope of a menu symbol.
> When using globalPragmaKeyword: (pragmaKeyword: today) it will search for methods containing the pragma in the entire system, which means you can have multiple classes defining menu entries in the same (global) menu.
> When using pragmaKeyword: (or what Alain calls localPragmaKeyword: ), only the hierarchy of the class in in which the method defining the PragmaMenuBuilder would be searched.
> Thus, you could have two different morph classes both defining<menu: #rightClickMenu> entries, and have their menu builders only pick up those defined for that class.
More information about the Pharo-project