Thanks Tracy Spratt.

--- In [email protected], "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> One primary benefit is that you can forget about getRepeaterItem(). Pass
> in a reference to the entire item,and implement a getter and setter, and
> your event handlers have direct access to the whole item through the
> event.target property.  Type the item specifically and avoid the "Class
> XML is not an IEventDispatcher" warnings
> 
>  
> 
> Defining a click event is easier to do and to read.
> 
>  
> 
> It is generally cleaner and easier to write and maintain.
> 
>  
> 
> Tracy
> 
>  
> 
> ________________________________
> 
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of danielvlopes
> Sent: Sunday, September 16, 2007 4:36 PM
> To: [email protected]
> Subject: [flexcoders] Re: Problem with repeater and image ???
> 
>  
> 
> What will be diferent when i repeat custom comps?
> 
> --- In [email protected] <mailto:flexcoders%40yahoogroups.com>
> , "Tracy Spratt" <tspratt@> wrote:
> >
> > Use a custom component for the repeated view, it simplifies things
> like
> > this.
> > 
> > Tracy
> > 
> > 
> > 
> > ________________________________
> > 
> > From: [email protected] <mailto:flexcoders%40yahoogroups.com>
> [mailto:[email protected] <mailto:flexcoders%40yahoogroups.com>
> ] On
> > Behalf Of Alex Harui
> > Sent: Sunday, September 16, 2007 12:14 AM
> > To: [email protected] <mailto:flexcoders%40yahoogroups.com> 
> > Subject: RE: [flexcoders] Problem with repeater and image ???
> > 
> > 
> > 
> > Target is the dispatcher, which is the loader of the image. Try
> > currentTarget, or use rptFoto.getRepeaterItem
> > 
> > 
> > 
> > ________________________________
> > 
> > From: [email protected] <mailto:flexcoders%40yahoogroups.com>
> [mailto:[email protected] <mailto:flexcoders%40yahoogroups.com>
> ] On
> > Behalf Of danielvlopes
> > Sent: Saturday, September 15, 2007 8:57 PM
> > To: [email protected] <mailto:flexcoders%40yahoogroups.com> 
> > Subject: [flexcoders] Problem with repeater and image ???
> > 
> > 
> > 
> > Helo everybody...
> > 
> > I having problems to try get repearter item when user click on image.
> > 
> > This is my code for repeater:
> > <mx:Repeater id="rptFoto" dataProvider="{objSelectedEquip.thumbs}">
> > <mx:HBox>
> > <mx:Image 
> > source="{rptFoto.currentItem}" 
> > buttonMode="true"
> > useHandCursor="true"
> > toolTip="Vizualizar"
> > click="exibirImagem(event)"/>
> > <mx:Button label="Alterar" click="exibirImagem(event)" /> 
> > </mx:HBox> 
> > </mx:Repeater>
> > 
> > When user click on button or image this function is called:
> > 
> > private function exibirImagem(event:MouseEvent):void{
> > 
> > var image:String = event.target.getRepearterItem();
> > var imgUrl:URLRequest = new
> > URLRequest(Funcoes.getImageFromThumb(image));
> > navigateToURL(imgUrl,"_blank");
> > }
> > 
> > When user click on button everything work, but whe click image this
> > error is dispatched "Property getRepeaterItem not found on
> > mx.core.FlexLoader and there is no default value." , anyone know some
> > way to fix this?
> > 
> > Thanks.
> >
>


Reply via email to