You need to use mx.utils.ArrayUtil.toArray().

Matt

-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Richard Schutten
Sent: Tuesday, February 21, 2006 6:40 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Problem with Repeater

Hi there,

I'm using Flex 2.0 Beta 1 and having a problem with using a Model as
dataProvider for the Repeater.
I entered an example code beneath:

<mx:Model id="test">
        <result>
                <item>Item 1</item>
        </result>
</mx:Model>

<mx:VBox>
        <mx:Repeater id="rep" dataProvider="{test.result.item}">
                <mx:Label text="{rep.currentItem}"/>
        </mx:Repeater>
</mx:VBox>

When the model contains one item, this code will not run. Using more
items
see code:

<mx:Model id="test">
        <result>
                <item>Item 1</item>
                <item>Item 2</item>
                <item>Item 3</item>
        </result>
</mx:Model>

And it will run correctly!

As i read in the documentation the Repeater can be used for one or more
components.

Does anyone know what's wrong?


Greetings,

Richard



--
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



 




--
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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to