0 Replies Latest reply on Nov 16, 2008 5:23 PM by rss181919

    Help with ArrayCollection Binding

      I have a panel with the following creation code.

      public function myCreationComplete():void
      Alert.show(String(BindingUtils.bindSetter(productResult, PrdVML.getInstance, 'sourcePrdVOList')));

      Aert.show('down-stream code')

      PrdVML is a view-model-locator class that initializes the arraycollection 'sourcePrdVOList' as follows:

      public var sourcePrdVOList:ArrayCollection = new ArrayCollection;

      The alert returned from the creation code binding call indicates that the bind watcher failed to initialize. All code downsteam in the creation event does not fire as indicated by the second alert failing to execute.

      Unusual symptoms.
      A Bind failure does not appear to be 100% because changes to the array collection still call the bound method 'productResult');

      B. Adding a single object to the array during instantiation seems to correct the problem (but this is a poor workaround I do not plan to implement).

      public var sourcePrdVOList:ArrayCollection = new ArrayCollection([new Object]);

      Is this 'by-design' in flex3? If so, can someone provide the design details so I can correct my setup?