I have the following code:
<mx:Repeater id="showNames" dataProvider="{parentApplication.bfa1aStudents}">
<mx:Text text="{parentApplication.getStudentName(showNames.currentItem)}" color="#8ab534" click="nameSelected(Number(showNames.getRepeaterItem(showNames.currentIndex)));" selectable="false" mouseOver="parentApplication.switchCursor(true);" mouseOut="parentApplication.switchCursor(false);" />
</mx:Repeater>
I know you can't use currentItem or currentIndex on a click... and that this problem is fixed with the getRepeaterItem() function, but I'm not sure exactly how to use it. The DP is a bunch of numbers, representing user IDs if that matters. If anybody can help me out with my "click" portion of the text, it'd be greatly appreciated.
try event.currentTarget.getRepeaterItem()
for click instead of showNames
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With