Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flex 3: Error: Repeater is not executing... i know why, but i dont know how to fix it

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.

like image 648
Brds Avatar asked Jan 19 '23 08:01

Brds


1 Answers

try event.currentTarget.getRepeaterItem() for click instead of showNames

like image 74
Satish Avatar answered Apr 30 '23 06:04

Satish