flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: rendererIsEditable in spark Datagrid
Date Wed, 20 Nov 2013 22:07:37 GMT
At some point, the renderer gets added to the display list and
addFocusables should be called again.  Maybe focusEnabled=false somewhere
in the tree?


On 11/20/13 11:24 AM, "João Fernandes"
<joaopedromartinsfernandes@gmail.com> wrote:

>Alex, your question did point me to the right direction, I found out the
>skin itself was setting hasFocusableChildren to false in the scroller.
>After fixing that, the problem is still there so I went to the moment it
>creates all the itemrenderers and noticed that for that ItemRenderer, the
>*addFocusables* function, does have checkChildren = true but unfortunately
>the else statement only loops through the children in container but the
>object itself I plan to get focus is under the elements property.
>For the ItemRenderer itself, it doesn't get added to the focusable list
>because it fails during the isTabVisible when it starts climbing the
>displayList, the Datagrid report hasFocusableChildren = false and fails
>*if (p is IFocusManagerComponent &&
>*                return false;*
>On 20 November 2013 17:37, Alex Harui <aharui@adobe.com> wrote:
>> Why is the object not in the focusableObjects list?
>> On 11/20/13 8:42 AM, "João Fernandes"
>> <joaopedromartinsfernandes@gmail.com> wrote:
>> >Hi guys,
>> >
>> >I have this issue with a spark datagrid where I have some
>> >defaultItemRenders with their default item Editors but with 2 columns
>> >the same custom ItemRenderer which are also marked in the gridColumn
>> >rendererIsEditable="true".
>> >When I try to tab between the editable columns, all defaults
>> >work as expected but once reached those custom renderers, tabbing stop
>> >working within the cells and jump to another component.
>> >
>> >I've been debugging for a while and I've noticed that during
>> >*setEditedItemPosition()* it tries to set focus on the ItemRenderer
>> >(setFocusInItemRenderer) but in the line *o =
>> >fm.getNextFocusManagerComponent(false) as DisplayObject;* it fails to
>> >the correct object because *getNextFocusManagerComponent2* in the
>> >*FocusManager* fails to find the index (returns -1) in line * i =
>> >getIndexOfFocusedObject(o);* because the ItemRenderer is not in the
>> >focusableObjects list.
>> >
>> >Does anyone know if there is any way to manage to get the ItemRenderer
>> >added to the focusableObjects list?
>> >
>> >
>> >--
>> >
>> >João Fernandes
>João Fernandes

View raw message