3 Replies Latest reply on May 20, 2008 4:54 PM by Gregory Lafrance

    Can a component use a main app's dataservice?

    EvolvedDSM Level 2
      I have several components that require the same dataservice and arraycollection to populate a control on each component.
      Here's how my dataservice and arrayCollection are declared and populated
      private var ds:DataService;
      private var items:ArrayCollection;
      private var item:ItemTable;

      items = new ArrayCollection;
      ds = new DataService("someDS");
      ds.fill(items);
      item = new ItemTable;

      I'd like to have this all in my main application, and then let my components use it. How can I call this dataservice and arraycollection from my main app to my components?