Yes, you can’t refer to currentItem in a handler function.  currentItem only exists when the repeater is being instantiated, and is undefined when the mouseDown occurs.

 

Use getRepeaterItem()

http://www.cflex.net/showfiledetails.cfm?ObjectID=199

 

Tracy

 


From: [email protected] [mailto:[email protected]] On Behalf Of Jeremy Crane
Sent: Wednesday, September 21, 2005 6:55 AM
To: [email protected]
Subject: [flexcoders] Passing arguments to a PopupManager

 

Does anyone see why I am having trouble passing arguments to a PopupManager when clicking on an image found in a Repeater?

 

<mx:Repeater id="videoRepeater" dataProvider="{array}">

                                                            <mx:Image toolTip="{videoRepeater.currentItem}" source="@Embed('../images/videoicon.gif')" width="21" height="18" mouseDown="mx.managers.PopUpManager.createPopUp(this,assets.components.pVideoPanel,true,{url:videoRepeater.currentItem})"/>

</mx:Repeater>

 

Using this code, the tooltip displays the name of the video as expected, however when I mouseDown on the image to create the popup, the value of url is not getting passed properly.  I have defined url as an Object within the popup component.




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




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to