Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
Adobe Flex SDK 3.5 (Release)
-
None
-
None
-
Affected OS(s): Windows
Affected OS(s): Windows XP
Browser: Firefox 3.x
Language Found: English
Description
Steps to reproduce:
1. Run code below
Actual Results:
list2 and list3 reports a length of 1 after the filter input has changed
Expected Results:
list3 and list3 should report a length of 0
Workaround (if any):
Don't know, maybe subclass ListCollectionView..? Wouldn't be the first class I have to subclass to fix a bug myself.
-------------
var numberToMatch:Number = 1;
var list1:ArrayCollection = new ArrayCollection([1,2,3]);
list1.addEventListener(CollectionEvent.COLLECTION_CHANGE, function(event:Event):void
);
var list2:ListCollectionView = new ListCollectionView(list1);
list2.filterFunction = function(item:Object):Boolean
;
list2.refresh();
var list3:ListCollectionView = new ListCollectionView(list2);
list3.sort = new Sort();
list3.refresh();
trace(list1.length);
trace(list2.length);
trace(list3.length);
numberToMatch = 4;
list1.refresh();
trace(list1.length);
trace(list2.length);
trace(list3.length);
list1.source = list1.source;
trace(list1.length);
trace(list2.length);
trace(list3.length);