Posts Tagged ‘binding’

Manual binding for Flex ArrayCollection

November 10, 2009 Leave a comment

I have been pulling my hair out for a while on this!
I was manually binding an arrayCollection using mx.binding.utils.ChangeWatcher:, "_comboChoices", prepareDataProvider);

and it did not work. After googling I have found the reason here:–watch—ArrayCollection-td20594413.html

and I finally came with this single – yet working – line of code:

_modelLocator._comboChoices.addEventListener(CollectionEvent.COLLECTION_CHANGE, prepareDataProvider);

that’s it ! My prepareDataProvider function was called ! 🙂