If you use pragmas, for defining your menus/shortcuts, there is (or was) a specific registration class supporting made for defining both in one.
It was never adopted, so I do not know where to find it again, sorry
Ben
Hi St�phane,
look into the AltBrowser code. You'll find commands that are both shortcuts and menu items (subclasses of AltCommand).
https://github.com/ThierryGoubier/AltBrowser/blob/master/Alt-Browser.package/AltCommand.class/instance/addItemToMenu..st
https://github.com/ThierryGoubier/AltBrowser/blob/master/Alt-Browser.package/AltCommand.class/instance/buildShortcut..st
And it's more or less lifted from the OmniBrowser code, by the way.
(Kind of convenient to link to st code from github)
Thierry
Le 18/06/2013 13:34, St�phane Ducasse a �crit :
Hi ben
I want to define some menu for my logging Tool UI. And I was wondering how
- define menu
- avoid duplication with shortcut
I looked at the EyeInspector but it is not clear to me. Do you have a
better example I could read?
Stef
--
Thierry Goubier
CEA list
Laboratoire des Fondations des Syst�mes Temps R�el Embarqu�s
91191 Gif sur Yvette Cedex
France
Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95