Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Adobe Flex SDK 2.0 (Release)
-
None
-
Affected OS(s): All OS Platforms
Affected OS(s): All OS Platforms
Language Found: English
Description
Reproduction:
1. Run the code below
2. Click Update several times (should be ok)
3. Sort the Count column of the grid
4. Click Update
Actual Results:
RangeError: Index '2' specified is out of bounds
at mx.collections::ListCollectionView/removeItemAt()
at mx.collections::ListCollectionView/removeAll()
at sortme/$internal::update()
at sortme/___Button4_click()
=========================================
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml" xmlns="*">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
var data:ArrayCollection = new ArrayCollection();
function update() {
var r:Object =
;
data.removeAll();
for (var k:String in r) {
data.addItem(
);
}
}
]]
>
</mx:Script>
<mx:Canvas width="100%" height="100%">
<mx:Panel x="34" y="29" height="534" width="740" title="Sort and Update Test">
<mx:Canvas height="100%" width="100%">
<mx:Button x="299" y="41" label="Update" click="update()"/>
<mx:DataGrid dataProvider="
{data}" width="100%" x="1" y="116" height="217">
<mx:columns>
<mx:DataGridColumn columnName="key" headerText="Event"/>
<mx:DataGridColumn columnName="value" headerText="Count"/>
</mx:columns>
</mx:DataGrid>
</mx:Canvas>
</mx:Panel>
</mx:Canvas>
</mx:Application>
Attachments
Issue Links
- is related to
-
FLEX-34838 getItemIndex returns -1 for item whose property was edited with GridItemEditor in a sorted DataGrid
- Resolved