Spec - TabManagerModel prevents the right/left keyboard navigation in TextModel

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Spec - TabManagerModel prevents the right/left keyboard navigation in TextModel

Glenn Cavarlé
Hi all,
When a TextModel is contained in a TabModel, right and left keyboard navigation doesn't work in the textarea.
Example :

| ui  |
ui := DynamicComposableModel new
        title: 'test';
        instantiateModels: #(#tabManager #TabManagerModel);
        yourself.
ui tabManager
        addTab:
                (TabModel new
                        label: 'Test';
                        model: (ui instantiate: TextModel);
                        yourself).
ui
        openWithSpecLayout:
                (SpecLayout composed
                        add: #tabManager;
                        yourself)

I don't know what happens exactly, but some key bindings are registered from ComposableModel >> #registerKeyStrokesForPreviousFor: and #registerKeyStrokesForNextFor:.
They handle left and right keyboard inputs. The only solution i found is to override these methods with a ^self, that avoid all keystrokes handling for next and previous focus in Spec models...

Any ideas?
(I tested in a fresh pharo5 image)

Regards,
Glenn.

Glenn Cavarlé
Reply | Threaded
Open this post in threaded view
|

Re: Spec - TabManagerModel prevents the right/left keyboard navigation in TextModel

Nicolai Hess
This will work when we move all shortcut definitions from cmdActions-map to the
keymapping framework. (only tested for the old TextModel<->PluggableTextMorph adapter).

2015-08-26 23:33 GMT+02:00 Glenn Cavarlé <[hidden email]>:
Hi all,
When a TextModel is contained in a TabModel, right and left keyboard
navigation doesn't work in the textarea.
Example :

| ui  |
ui := DynamicComposableModel new
        title: 'test';
        instantiateModels: #(#tabManager #TabManagerModel);
        yourself.
ui tabManager
        addTab:
                (TabModel new
                        label: 'Test';
                        model: (ui instantiate: TextModel);
                        yourself).
ui
        openWithSpecLayout:
                (SpecLayout composed
                        add: #tabManager;
                        yourself)

I don't know what happens exactly, but some key bindings are registered from
ComposableModel >> #registerKeyStrokesForPreviousFor: and
#registerKeyStrokesForNextFor:.
They handle left and right keyboard inputs. The only solution i found is to
override these methods with a ^self, that avoid all keystrokes handling for
next and previous focus in Spec models...

Any ideas?
(I tested in a fresh pharo5 image)

Regards,
Glenn.





-----
Glenn Cavarlé
--
View this message in context: http://forum.world.st/Spec-TabManagerModel-prevents-the-right-left-keyboard-navigation-in-TextModel-tp4846158.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: Spec - TabManagerModel prevents the right/left keyboard navigation in TextModel

Glenn Cavarlé
Thanks Nicolai,
How does the KM framework work ? Pragmas can be used ?
What is the roadmap to test with the new TextModel ?
There is no rush for me, it's just to know.

Regards,
Glenn.
Glenn Cavarlé