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
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... https://github.com/ThierryGoubier/AltBrowser/blob/master/Alt-Browser.package... 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
For menus, there is nothing spec related here (yet). 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 On Jun 18, 2013, at 1:48 PM, Goubier Thierry <thierry.goubier@cea.fr> wrote:
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...
https://github.com/ThierryGoubier/AltBrowser/blob/master/Alt-Browser.package...
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
ok I will try to find my way but yes it would be good to offer an infrastructure to avoid that everybody reinvent the wheel Stef On Jun 18, 2013, at 2:49 PM, Benjamin <benjamin.vanryseghem.pharo@gmail.com> wrote:
For menus, there is nothing spec related here (yet). 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
On Jun 18, 2013, at 1:48 PM, Goubier Thierry <thierry.goubier@cea.fr> wrote:
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...
https://github.com/ThierryGoubier/AltBrowser/blob/master/Alt-Browser.package...
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
Le 18/06/2013 15:35, Stéphane Ducasse a écrit :
ok I will try to find my way but yes it would be good to offer an infrastructure to avoid that everybody reinvent the wheel
At the same time, beware of over-architecturing. I hates a framework where hacking it to do a simple subset of the "do everything" is faster than learning the "do everything" stuff. Thierry
Stef On Jun 18, 2013, at 2:49 PM, Benjamin <benjamin.vanryseghem.pharo@gmail.com <mailto:benjamin.vanryseghem.pharo@gmail.com>> wrote:
For menus, there is nothing spec related here (yet). 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
On Jun 18, 2013, at 1:48 PM, Goubier Thierry <thierry.goubier@cea.fr <mailto:thierry.goubier@cea.fr>> wrote:
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...
https://github.com/ThierryGoubier/AltBrowser/blob/master/Alt-Browser.package...
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
-- 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
is buildShortcut: standard? is it invoked automatically? Stef On Jun 18, 2013, at 1:48 PM, Goubier Thierry <thierry.goubier@cea.fr> wrote:
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...
https://github.com/ThierryGoubier/AltBrowser/blob/master/Alt-Browser.package...
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
Le 18/06/2013 15:34, Stéphane Ducasse a écrit :
is
buildShortcut: * * *standard?*
No. Lack of infrastructure for that :) Spec has some of the relevant bits and could automatize this a bit. KMDispatcher still doesn't work totally as I would like.
*is it invoked automatically?*
Yes. GUI model, when selected object changes, call an updateKeymap method which calls a https://github.com/ThierryGoubier/AltBrowser/blob/master/Alt-Browser.package... on the selected object in the GUI. Thierry
* *Stef* * * On Jun 18, 2013, at 1:48 PM, Goubier Thierry <thierry.goubier@cea.fr <mailto:thierry.goubier@cea.fr>> wrote:
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...
https://github.com/ThierryGoubier/AltBrowser/blob/master/Alt-Browser.package...
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
-- 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
participants (3)
-
Benjamin -
Goubier Thierry -
Stéphane Ducasse