You cannot access the currentItem property
of a repeater without using binding _expression_ and Flex does not support using
binding _expression_ inside event handlers. For this reason we have a
getRepeaterItem() property and if you use this code, it should work.
click="alert(event.target.getRepeaterItem().name)”
-Ashish
From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf
Of Hasan Basri
Sent: Wednesday, November 23, 2005
2:00 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] mx:Repeater
problem
in the
following code, I have a problem stated below,
label="{list.currentItem.name}" returns a value
but click="alert(list.currentItem.name)"
returns nothing
how to correct this situation? thanks in advance...
----------------------------------------------------------------------------
<mx:Repeater id="list" dataProvider="{dosyalar}">
<mx:VBox verticalGap="0" horizontalAlign="center">
<mx:HBox>
<mx:Image width="45" height="44"
source="@Embed('./klasor.jpg')"
toolTip="${list.currentItem.name}"/>
<mx:Link label="{list.currentItem.name}"
click="alert(list.currentItem.name)"
toolTip="{list.currentItem.path}"/>
<mx:Label text="dsy{list.currentItem.id}" />
</mx:HBox>
</mx:VBox>
</mx:Repeater>
Yahoo! kullaniyor musunuz?
Simdi, 1GB e-posta saklama alani sunuyor
http://tr.mail.yahoo.com
--
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
|