0 Replies Latest reply on Jul 20, 2006 10:55 AM by mike2281

    [Bindable] ArrayCollection

      Here is the code, the problem is that set Modules only fires once, and does not fire when the collection changes, addItem() is used on the collection.

      Class containing array collection
      public class App
      public function get Modules():ArrayCollection { return this._modules; }
      private var _ modules: ArrayCollection = new ArrayCollection ();

      public static function get Instance():App
      if(!App._instance) App._instance = new App ();
      return App._instance;
      private static var _instance: App;

      Here is the binding mxml

      Here is the set for Modules above and there is no get.
      public function set Modules(modules : ArrayCollection):void

      Modules is only called once and is never called again when the collection changes, I verified this by creating a click event that manually updates Modules, just for debugging

      Here is the code for the test click event:
      public function onClick():void
      this.Modules = WebApplication.Instance.WebCmsModules;

      Also this works if use a var instead of a set but my problem is I need to fire some code when Modules is set so it cant be used.
      public var Modules:ArrayCollection;