The value for myData.poste.icon is just a string, not the reference to
the image. I believe you'd need to do something like the following:
<mx:Image id="iconImg"
source="{rep.currentItem.icon=='poste1'? poste1 : poste2}" />
A function returning the proper icon class reference would probably be
even better.
--- In [email protected], "Pat Buchanan" <[EMAIL PROTECTED]> wrote:
>
> FlapFlap:
>
> Did you ever get an answer to this? I'm experiencing the same problem.
>
> Thanks!
>
>
> On 5/19/06, Flapflap <[EMAIL PROTECTED]> wrote:
> >
> > Hi there,
> >
> > I got a object source that I use with a repeater
> > In this repeater I have a Image so source is binding to
> > rep.currentItem.icon
> > The icon is a string representive the object embedding the image.
> > But the image dosen't load.
> > Same technique for a icon fiel of a list works well.
> >
> > Example :
> >
> > <mx:Repeater id="rep" dataProvider="{myData}">
> > <mx:Image id="iconImg" source="{rep.currentItem.icon}"/>
> > </mx:Repeater>
> > <mx:Script>
> > <![CDATA[
> > // Embed icons.
> > [Bindable]
> > [Embed(source="dpl/img/group.png")]
> > public var poste1:Class;
> > [Bindable]
> > [Embed(source="dpl/img/calendar.png")]
> > public var poste2:Class;
> > ]]!>
> > </mx:Script>
> >
> > myData =
> > <poste>
> > <icon>poste1</icon>
> > </poste>
> > <poste>
> > <icon>poste2</icon>
> > </poste>
> >
> > Hopes its clear...
> >
> > --
> > Flapflap[at]sans-facon.net --
> > DevBlog : http://www.kilooctet.net
> >
> >
> >
> >
> > --
> > 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
> >
> >
> >
> >
> >
> >
> >
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->
--
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/