[
https://issues.apache.org/jira/browse/FLEX-19652?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Justin Mclean resolved FLEX-19652.
----------------------------------
Resolution: Fixed
No longer an issue in Apache Flex 4.10. Old bug not sure when this was fixed.
> Switching between combo box data providers (Flex 2.0)
> -----------------------------------------------------
>
> Key: FLEX-19652
> URL: https://issues.apache.org/jira/browse/FLEX-19652
> Project: Apache Flex
> Issue Type: Bug
> Components: mx: ComboBox
> Affects Versions: Adobe Flex SDK 2.0 (Release)
> Environment: Affected OS(s): Windows
> Affected OS(s): Windows XP
> Browser: Firefox 3.x
> Language Found: English
> Reporter: Adobe JIRA
>
> Steps to reproduce:
> 1. Declare two ArrayCollections: oldDataProvider, newDataProvider.
> 2. Declare one combo box with oldDataProvider as its data provider.
> 3. Switch with ActionScript the data provider of combo box to newDataProvider.
> 4. Remove an item from oldDataProvider ArrayCollection. The index of the item
> that is removed must be in the range of indices of the newDataProvider
> ArrayCollection, i.e. oldDataProvider.removeItemAt(n), where n <
> newDataProvider.length.
>
> Actual Results:
>
> An item with the corresponding index is also removed from the newDataProvider
> ArrayCollection.
>
> Expected Results:
>
> The newDataProvider ArrayCollection should not have changed.
>
> Workaround (if any):
>
> Extend the combo box as below (reference:
> http://stackoverflow.com/questions/957747/switching-between-data-providers-flex-2-0/958086#958086)
> public class FixedComboBox extends ComboBox
> {
> public function FixedComboBox()
> {
> super();
> }
> override public function set dataProvider(value:Object):void
> {
> if (collection)
>
> collection.removeEventListener(CollectionEvent.COLLECTION_CHANGE,
> collectionChangeHandler);
> super.dataProvider = value;
> }
> }
--
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