2 Replies Latest reply on Jun 17, 2008 11:04 AM by ntsiii

    DataProvider

    jwoozy
      I'm having an issue not only setting the dataProvider, but using it.

      Code:

      import mx.package.to.class;

      [Bindable]
      public var:XML = new XML();

      public function init():void{
      //call http function
      }
      public function http():void{
      //new httpservice object
      //parms
      }
      public function handlers(event:Result, Fault):void{
      //Alert errors
      //File:XML assignment.
      }
      public function forDataGrid():void{
      var dg:DataGrid = new DataGrid();
      dg.dataProvider = file;
      }

      when I try to print out the dataProvider to a TextArea or whatever... does not seem to work. Thoughts? Do I need to use and different dataprovider such as ArrayCollection or XMLListCollection...
        • 1. Re: DataProvider
          Garyl Woolworth Level 1
          It would be best to use one of the collection types, however the code you have provided was not written very well and will throw many errors so I don't know which part it is failing on due to missing pieces already. If you can write a better case scenario it would make it much easier to troubleshoot where the problem lies.
          • 2. Re: DataProvider
            ntsiii Level 3
            Yes, exactly, read the docs a little or find an example, and at least have some code that will compile before asking for help.
            Tracy