Spec #focusOrder

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

Spec #focusOrder

Julien Delplanque
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,

Julien

Reply | Threaded
Open this post in threaded view
|

Re: Spec #focusOrder

Nicolai Hess-3-2


2016-02-10 12:20 GMT+01:00 Julien Delplanque <[hidden email]>:
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 ?
 

Julien


Reply | Threaded
Open this post in threaded view
|

Re: Spec #focusOrder

Julien Delplanque


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

> 2016-02-10 12:20 GMT+01:00 Julien Delplanque <[hidden email]>:
>
>> 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.

Julien

Reply | Threaded
Open this post in threaded view
|

Re: Spec #focusOrder

Nicolai Hess-3-2


2016-02-10 13:15 GMT+01:00 Julien Delplanque <[hidden email]>:


On 10/02/16 12:48, Nicolai Hess wrote:
2016-02-10 12:20 GMT+01:00 Julien Delplanque <[hidden email]>:

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.


 

Julien


Reply | Threaded
Open this post in threaded view
|

Re: Spec #focusOrder

Julien Delplanque


On 10/02/16 14:00, Nicolai Hess wrote:

> 2016-02-10 13:15 GMT+01:00 Julien Delplanque <[hidden email]>:
>
>>
>> On 10/02/16 12:48, Nicolai Hess wrote:
>>
>>> 2016-02-10 12:20 GMT+01:00 Julien Delplanque <[hidden email]>:
>>>
>>> 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 | Threaded
Open this post in threaded view
|

Re: Spec #focusOrder

Julien Delplanque


On 10/02/16 14:09, Julien Delplanque wrote:

>
>
> On 10/02/16 14:00, Nicolai Hess wrote:
>> 2016-02-10 13:15 GMT+01:00 Julien Delplanque <[hidden email]>:
>>
>>>
>>> On 10/02/16 12:48, Nicolai Hess wrote:
>>>
>>>> 2016-02-10 12:20 GMT+01:00 Julien Delplanque <[hidden email]>:
>>>>
>>>> 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
>
When I use your method, I have the good behavior when going to the next
sub-widget using tabulation but I have a strange behavior when going to
the previous widget.

If I take the same example with widgetA and widgetB, when trying to
reach previous sub-widgets with the focus, I can only access the first
button of each sub-widget is it normal? How can I fix this?

Thanks in advance,

Julien