Skylar Sutton created FLEX-35007:
------------------------------------
Summary: 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
We have an advanced datagrid defined as such:
<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>
If the ArrayCollection myGridColumns is rebound, from a click that originates
within the grid, we're getting a 1009 error on AdvancedListBase:9250
var rowData:BaseListData = rowMap[item.name];
lastUID = rowData.uid;
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 (rowMap[item.name])
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?).
Simple Fix:
AdvancedListBase.mouseOverHandler:
...
if (lastHighlightItemRenderer && highlightUID)
{
var rowData:BaseListData = rowMap[item.name];
if (!rowData) {
return;
}
lastUID = rowData.uid;
}
...
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)