3 Replies Latest reply on Apr 8, 2009 6:20 AM by Michael Borbor

    New to flex

      HI Folks,

       

      Just working on a very simple piece of code and not sure why I'm going wrong. I simply want to output the list to the screen:

       

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="test();">
          <mx:Script>
              <![CDATA[
              private function test():void {
                  var example:Array = [];
                  example.push({ex:'test'});
                  example.push({ex:'test2'});
                  output.dataProvider = example;
              }
              ]]>
          </mx:Script>
         
          <mx:List id="output">
             
          </mx:List>
             
      </mx:Application>

       

      I have tried adding DataProvider tags and Components but I don't know how to access the data.

       

      Any help would be great.

       

      Thanks

       

      A