Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Adobe Flex SDK 4.1 (Release)
-
Affected OS(s): All OS Platforms
Affected OS(s): All OS Platforms
Language Found: English
Description
We are seeing this bug as well in SDK 4.1. As comments in the original bug stated, the internal list is not synchronized with the ArrayCollection.
We have a DataGrid displaying a collection of objects in an ArrayCollection. When we sort the values in the datagrid, we get the error "Index '-1' specified is out of bounds" on calls to arrayCollection.removeAll().
Possibly relevant: had set arrayCollection.disableAutoUpdate() before calling removeAll().
original bug:
----------------------------
Steps to reproduce:
1. Create a sorted ArrayCollection
2. example: this._mySortedArrayCollection.sort = myAlphaSort;
3. populate the array and then remove any valid item with "removeItemAt"
Actual Results:
RangeError: Index '-1' specified is out of bounds.
at mx.collections::ArrayList/removeItemAt()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\collections\ArrayList.as:358]
at mx.collections::ListCollectionView/removeItemAt()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:601]
...
The RangError always says "Index '-1'" not matter what index value is entered. For example this._mySortedArrayCollection.removeItemAt(7); with return the above same RangeError saying "Index '-1'"
Expected Results:
The item at the selected index should be removed from the ArrayCollection
Workaround (if any):
None