[ https://issues.apache.org/jira/browse/FLEX-25071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13655092#comment-13655092 ]
Justin Mclean commented on FLEX-25071: -------------------------------------- Confirmed still an issue in Apache Flex 4.9.1 > removeAll() on a sorted ArrayCollection returns a RangeError: Index '-1' > ------------------------------------------------------------------------ > > Key: FLEX-25071 > URL: https://issues.apache.org/jira/browse/FLEX-25071 > Project: Apache Flex > Issue Type: Bug > Components: Collections > Affects Versions: Adobe Flex SDK 4.1 (Release) > Environment: Affected OS(s): All OS Platforms > Affected OS(s): All OS Platforms > Language Found: English > Reporter: Adobe JIRA > Labels: easyfix, easytest > > 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 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira