IMHO The data wont show up because TestData is not defined anywhere, I tried to play with your code.. check this

 

<?xml version="1.0"?>

<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">

 

<mx:Script>

      </mx:Script>

                        <mx:Array id="myData">

                                                <mx:Object>

                                                            <data1>abc</data1>

                                                            <data2>def</data2>

                                                </mx:Object>

                                                <mx:Object>

                                                            <data1>ghi</data1>

                                                            <data2>jkl</data2>

                                                </mx:Object>

                        </mx:Array>

      <mx:Repeater id="myRepeater" dataProvider="{myData}">

             

      <mx:Label text="{myRepeater.currentItem.data1}"/>

             

      </mx:Repeater>

</mx:Application>

 

 

Let me know if it worked fine for you or not?

 

Best regards,

Pranav

 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of r_woess
Sent: Wednesday, August 17, 2005 2:52 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Repeater doesn't work

 

Hi,

I tried tu use a Repeater like you can see in the code below. Can
anybody tell me, why no data will be shown?


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"
creationComplete="CreationComplete();">
     
      <mx:Script>
      <![CDATA[
            public var myData:Array;
            public function CreationComplete():Void
            {
                  myData=new Array();
                  var testdata:TestData;
                  testdata=new TestData();
                  testdata.data1="abc";
                  testdata.data2="def";
                  myData.push(testdata);
                  testdata=new TestData();
                  testdata.data1="ghi";
                  testdata.data2="jkl";
                  myData.push(testdata);
            }
      ]]>
      </mx:Script>

      <mx:Repeater id="myRepeater" dataProvider="{myData}">
            <mx:Label text="{myRepeater.currentItem.data1}"/>
      </mx:Repeater>
</mx:Application>


-------------------------------------------------------------------

class TestData {

      public var data1 : String;
      public var data2 : String;
}

-------------------------------------------------------------------

best regards
reini





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to