[ https://issues.apache.org/jira/browse/FLEX-23785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Justin Mclean updated FLEX-23785: --------------------------------- Labels: easyfix easytest (was: ) > ArrayCollection.itemUpdated does not update the view when filterFunction is > not null > ------------------------------------------------------------------------------------ > > Key: FLEX-23785 > URL: https://issues.apache.org/jira/browse/FLEX-23785 > Project: Apache Flex > Issue Type: Bug > Components: Collections > Affects Versions: Adobe Flex SDK 3.5 (Release) > Environment: Affected OS(s): Windows > Affected OS(s): Windows XP > Browser: Firefox 3.x > Language Found: English > Reporter: Adobe JIRA > Labels: easyfix, easytest > > Steps to reproduce: > 1. create an ArrayCollection with filterFunction function(...z):Boolean { > return true; } > 2. bind it to mx:List as dataProvider > 3. change one of the objects and perform ArrayCollection.itemUpdated > > Actual Results: > The view does not change automatically. > > Expected Results: > The view should change. > > Workaround (if any): > Call ArrayCollection.refresh() after all updates > Reason: > If filterFunction was null, this would work. > Code: > File > http://opensource.adobe.com/svn/opensource/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ListCollectionView.as > private function handlePropertyChangeEvents(events:Array):void > Instruction: > updateEntry.move = > updateEntry.move > || filterFunction > || !updateInfo.property > || (sort && > sort.propertyAffectsSort(String(updateInfo.property))); > Before this assignment updateEntry.move == false > But after updateEntry.move == filterFunction (probably should be still > Boolean) > Another instruction: > if (updateEntry.move) > { > moveItemInView(updateEntry.item, updateEntry.item, > eventItems); > } > else > { > eventItems.push(updateEntry.item); > } > As a result of the previous mistake, the if branch executes. > It's very likely to be working if the else branch executed instead. > As a final consequence no event is dispatched at the very end of the function. > When filterFunction is null, the huge if (95% of the function) does not > execute and the event at the very end of the function is dispatched. -- 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