[ https://issues.apache.org/jira/browse/FLEX-35007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Justin Mclean updated FLEX-35007: --------------------------------- Labels: easyfix easytest (was: ) > 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 > Labels: easyfix, easytest > > 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)