flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Skylar Sutton (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (FLEX-35007) Error 1009 in AdvancedListBase after re-binding backing array collection
Date Tue, 12 Jan 2016 19:42:39 GMT

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

Skylar Sutton edited comment on FLEX-35007 at 1/12/16 7:41 PM:
---------------------------------------------------------------

Possibly related/similar to FLEX-34862?


was (Author: skylar.sutton@gmail.com):
Possibly related to FLEX-34862?

> Error 1009 in AdvancedListBase after re-binding backing array collection
> ------------------------------------------------------------------------
>
>                 Key: FLEX-35007
>                 URL: https://issues.apache.org/jira/browse/FLEX-35007
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Advanced Data Grid
>    Affects Versions: Apache Flex 4.14.1
>            Reporter: Skylar Sutton
>
> h2. Background
> We have an advanced datagrid defined as such:
> {code:borderStyle=solid}
> <mx:AdvancedDataGrid	
>     headerStyleName="headerStyle"
>     headerSortSeparatorSkin="mx.skins.ProgrammaticSkin"
>     id="myGrid"
>     designViewDataType="tree" 
>     displayItemsExpanded="true"
>     treeColumn="{supersessionTreeGrid.columns[1]}"
>     width="100%" 
>     maxWidth="{this.width-10}" 
>     height="100%"
>     dataProvider="{new HierarchicalData(model.myGridData)}"						
>     verticalGridLines="false"
>     sortableColumns="false"
>     draggableColumns="false" 
>     borderAlpha="1"
>     folderClosedIcon="{null}" 
>     folderOpenIcon="{null}"
>     defaultLeafIcon="{null}"
>     variableRowHeight="true"
>     borderVisible="true"
>     columns="{model.myGridCOlumns}" 
> </mx:ExtendedAdvancedDataGrid>
> {code}
> If the ArrayCollection myGridColumns is rebound, from a click that originates within
the grid, we're getting a 1009 error on AdvancedListBase:9250
> {code:title=AdvancedListBase.as:9249|borderStyle=solid}
>     var rowData:BaseListData = rowMap[item.name];
>     lastUID = rowData.uid;
> {code}
> h2. Root Cause
> It appears that the AdvancedListBase is trying to execute a mouseOverHandler event against
the OLD row data (prior to the rebind). Since the new row data does not contain the item in
question, the rowMap lookup returns a null object, and "rowData.uid" pops a NPE. 
> The simple fix is to just wrap another null check around that... but I'm not sure if
it's symptmatic of something larger (e.g. should the event be supressed higher up?).
> h2. Simple Fix
> {code:title=AdvancedListBase.as:9247|borderStyle=solid}
>     ...
>     if (lastHighlightItemRenderer && highlightUID)
>     {
>         var rowData:BaseListData = rowMap[item.name];
>         if (!rowData) {
>             return;
>         }
>         lastUID = rowData.uid;
>     }
>     ...
> {code}



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

Mime
View raw message