[Pharo-project] spec + shortcuts
I just looked at https://code.google.com/p/pharo/issues/detail?id=6736 Everything looks more or less ok, the keymapping integration is nice! I have one doubt though (and I really don't know anything about spec...). How do I explicitly set the default focus when opening an spec UI-item?
Hi Camillo, Sorry for not answering earlier; at the moment, I'm on duty and offline during daytime for two weeks :( For selecting by hand the focus, you can use takeKeyboardFocus on the model of the widget you want to activate; by default, Morphic selects the first keyboard interested morph. However, it may be hard to find the right place to set the keyboard focus after opening the window. I think that Spec should have the equivalent to VisualWorks' postBuildWith: and postOpenWith: (if my memory is right) to make that easier. Thierry ________________________________________ De : pharo-project-bounces@lists.gforge.inria.fr [pharo-project-bounces@lists.gforge.inria.fr] de la part de Camillo Bruni [camillobruni@gmail.com] Date d'envoi : lundi 8 octobre 2012 20:17 Ã : Pharo-project@lists.gforge.inria.fr Development Objet : [Pharo-project] spec + shortcuts I just looked at https://code.google.com/p/pharo/issues/detail?id=6736 Everything looks more or less ok, the keymapping integration is nice! I have one doubt though (and I really don't know anything about spec...). How do I explicitly set the default focus when opening an spec UI-item?
humm ok, that's too much work for me now, plus I cannot know the side-effects. For now I will take your fix in 6736 and create a keymapping only version. like that I can get it integrated this week plus test it. best cami On 2012-10-08, at 21:15, GOUBIER Thierry <thierry.goubier@cea.fr> wrote:
Hi Camillo,
Sorry for not answering earlier; at the moment, I'm on duty and offline during daytime for two weeks :(
For selecting by hand the focus, you can use takeKeyboardFocus on the model of the widget you want to activate; by default, Morphic selects the first keyboard interested morph.
However, it may be hard to find the right place to set the keyboard focus after opening the window. I think that Spec should have the equivalent to VisualWorks' postBuildWith: and postOpenWith: (if my memory is right) to make that easier.
Thierry
________________________________________ De : pharo-project-bounces@lists.gforge.inria.fr [pharo-project-bounces@lists.gforge.inria.fr] de la part de Camillo Bruni [camillobruni@gmail.com] Date d'envoi : lundi 8 octobre 2012 20:17 Ã : Pharo-project@lists.gforge.inria.fr Development Objet : [Pharo-project] spec + shortcuts
I just looked at https://code.google.com/p/pharo/issues/detail?id=6736 Everything looks more or less ok, the keymapping integration is nice!
I have one doubt though (and I really don't know anything about spec...).
How do I explicitly set the default focus when opening an spec UI-item?
Well, as long as you're happy with the way Keymapping is integrated in Spec, it's moving forward a bit. But I'm not sure Spec current focusOrder will still work; it may needs to be rewritten using Keymapping. There is something else I discovered when reverting to Morphic instead of Spec is that my Spec-based app seemed to be very memory hungry compared to the Morphic version with the same code and functionality. Old instances of the app seemed to be very hard to garbage collect. Thierry ________________________________________ De : pharo-project-bounces@lists.gforge.inria.fr [pharo-project-bounces@lists.gforge.inria.fr] de la part de Camillo Bruni [camillobruni@gmail.com] Date d'envoi : lundi 8 octobre 2012 22:32 Ã : Pharo-project@lists.gforge.inria.fr Objet : Re: [Pharo-project] RE : spec + shortcuts humm ok, that's too much work for me now, plus I cannot know the side-effects. For now I will take your fix in 6736 and create a keymapping only version. like that I can get it integrated this week plus test it. best cami On 2012-10-08, at 21:15, GOUBIER Thierry <thierry.goubier@cea.fr> wrote:
Hi Camillo,
Sorry for not answering earlier; at the moment, I'm on duty and offline during daytime for two weeks :(
For selecting by hand the focus, you can use takeKeyboardFocus on the model of the widget you want to activate; by default, Morphic selects the first keyboard interested morph.
However, it may be hard to find the right place to set the keyboard focus after opening the window. I think that Spec should have the equivalent to VisualWorks' postBuildWith: and postOpenWith: (if my memory is right) to make that easier.
Thierry
________________________________________ De : pharo-project-bounces@lists.gforge.inria.fr [pharo-project-bounces@lists.gforge.inria.fr] de la part de Camillo Bruni [camillobruni@gmail.com] Date d'envoi : lundi 8 octobre 2012 20:17 Ã : Pharo-project@lists.gforge.inria.fr Development Objet : [Pharo-project] spec + shortcuts
I just looked at https://code.google.com/p/pharo/issues/detail?id=6736 Everything looks more or less ok, the keymapping integration is nice!
I have one doubt though (and I really don't know anything about spec...).
How do I explicitly set the default focus when opening an spec UI-item?
On 2012-10-08, at 22:57, GOUBIER Thierry <thierry.goubier@cea.fr> wrote:
Well, as long as you're happy with the way Keymapping is integrated in Spec, it's moving forward a bit. But I'm not sure Spec current focusOrder will still work; it may needs to be rewritten using Keymapping.
the keymapping stuff is great, at least for me straight-forward. It's actually the first time I really have a look at spec ;). But the whole focus stuff is a bit harder to grasp in your changes... So I leave that to people who know more about spec than I do.
There is something else I discovered when reverting to Morphic instead of Spec is that my Spec-based app seemed to be very memory hungry compared to the Morphic version with the same code and functionality. Old instances of the app seemed to be very hard to garbage collect.
I guess there is a lot to optimize in spec, since it's still quite young...
________________________________________ De : pharo-project-bounces@lists.gforge.inria.fr [pharo-project-bounces@lists.gforge.inria.fr] de la part de Camillo Bruni [camillobruni@gmail.com] Date d'envoi : lundi 8 octobre 2012 23:04 Ã : Pharo-project@lists.gforge.inria.fr Objet : Re: [Pharo-project] RE : RE : spec + shortcuts On 2012-10-08, at 22:57, GOUBIER Thierry <thierry.goubier@cea.fr> wrote:
Well, as long as you're happy with the way Keymapping is integrated in Spec, it's moving forward a bit. But I'm not sure Spec current focusOrder will still work; it may needs to be rewritten using Keymapping.
the keymapping stuff is great, at least for me straight-forward. It's actually the first time I really have a look at spec ;). But the whole focus stuff is a bit harder to grasp in your changes... So I leave that to people who know more about spec than I do.
In fact, the focus stuff I did is in 6734. The thing with doing the focus in Keymapping is that the tab and crtl+tab events, when processed by Keymapping, are then considered as handled and not forwarded to the model, making the focusOrder of Spec non working since it takes place at the very end of the keyboard event processing sequence, if I'm not wrong. I'm a bit waiting on a Spec specialist to have a look into that as well :)
There is something else I discovered when reverting to Morphic instead of Spec is that my Spec-based app seemed to be very memory hungry compared to the Morphic version with the same code and functionality. Old instances of the app seemed to be very hard to garbage collect.
I guess there is a lot to optimize in spec, since it's still quite young...
That's true...
You can specify the focus sequence by adding the sub widget into focusOrder self focusOrder add: widget1; add: widget2; etc Ben On Oct 8, 2012, at 8:17 PM, Camillo Bruni wrote:
I just looked at https://code.google.com/p/pharo/issues/detail?id=6736 Everything looks more or less ok, the keymapping integration is nice!
I have one doubt though (and I really don't know anything about spec...).
How do I explicitly set the default focus when opening an spec UI-item?
participants (3)
-
Benjamin -
Camillo Bruni -
GOUBIER Thierry