On 10/02/16 14:00, Nicolai Hess wrote:
2016-02-10 13:15 GMT+01:00 Julien Delplanque <jul...@tamere.eu>:


On 10/02/16 12:48, Nicolai Hess wrote:

2016-02-10 12:20 GMT+01:00 Julien Delplanque <jul...@tamere.eu>:

Hi,
I am trying to manage the focus order of my widget that uses sub-widgets
with their #focusOrder defined.

How do spec manage nested focus order? I see in the implementation that
it
is simply an OrderedCollection.

I does not behave as I expected, when I add my sub-widgets to the focus
order, the focus is given to the first sub-widget and I can not access
the
second sub-widget using tabulation.

For example lets imagine WidgetA contains 2 buttons and WidgetB contains
2
buttons. I can only access the two buttons of WidgetA using tabulation.

How can I deal with that?

Thanks in advance,

Hi Julien,
how are WidgetA and WidgetB connected ? Are they both (spec)-models used
by
another main model ?

Hi Nicolai,
Yes they are subclasses of ComposableModel used by another main model.

Ok, so, if your main model has instance  variables for widgetA and widgetB,
can you add this in the method where you instantiate WidgetA and WidgetB:

widgetA focusOrder add: widgetB.
widgetB focusOrder add: widgetA.

Oh ok, I will try that. I was adding widgetA and widgetB to the focusOrder of my main widget :/...

Thanks,

Julien


Reply via email to