flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mihai Chira (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-32249) AdvancedDataGrid.makeListData() incorrectly references HierarchicalCollectionViewCursor class instead of IHierarchicalCollectionViewCursor interface
Date Tue, 05 May 2015 11:26:59 GMT

    [ https://issues.apache.org/jira/browse/FLEX-32249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14528278#comment-14528278
] 

Mihai Chira commented on FLEX-32249:
------------------------------------

[~nguyenbs] do you have a scenario which causes a problem due to this issue? It's much easier
to make the change when there's something clear to test against.
Also, if you then want to send in a patch, I'm happy to apply it and test that the issue is
solved.

> AdvancedDataGrid.makeListData() incorrectly references HierarchicalCollectionViewCursor
class instead of IHierarchicalCollectionViewCursor interface
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLEX-32249
>                 URL: https://issues.apache.org/jira/browse/FLEX-32249
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Advanced Data Grid
>    Affects Versions: Adobe Flex SDK Previous
>         Environment: Affected OS(s): All OS Platforms
> Affected OS(s): All OS Platforms
> Language Found: English
>            Reporter: Adobe JIRA
>            Assignee: Adobe JIRA
>            Priority: Minor
>             Fix For: Adobe Flex SDK Previous
>
>
> The AdvancedDataGrid.makeListData() function incorrectly checks "iterator" against the
HierarchicalCollectionViewCursor class, when it should check against the IHierarchicalCollectionViewCursor
interface instead.  This means that custom cursors that "extend" HierarchicalCollectionViewCursor
will be recognized correctly as being hierarchical, but custom cursors that directly "implement"
the IHierarchicalCollectionViewCursor interface instead will not.
> The solution is clear: change all references to HierarchicalCollectionViewCursor in AdvancedDataGrid.makeListData()
to IHierarchicalCollectionViewCursor instead.  Note, this bug was also present in the AdvancedDataGrid.getItemDepth()
/ getCurrentCursorDepth() function chain back in build 184505, but that has since been fixed...
this bug should probably have been fixed at the same time :)
> Workaround:
> Subclass the AdvancedDataGrid, adding the following override:
>     override protected function makeListData(data:Object, uid:String, rowNum:int, columnNum:int,
column:AdvancedDataGridColumn):BaseListData {
>       var advancedDataGridListData:AdvancedDataGridListData = super.makeListData(data,uid,rowNum,columnNum,column)
as AdvancedDataGridListData;
>       if (iterator && iterator is IHierarchicalCollectionViewCursor &&
!(iterator is HierarchicalCollectionViewCursor)
>                    && columnNum == treeColumnIndex && !(data is AdvancedDataGridColumn))
>         initListData(data, advancedDataGridListData);
>       return advancedDataGridListData;
>     }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message