加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Flex 3:错误:Repeater没有执行…我知道为什么,但我不知道如何

发布时间:2020-12-15 01:48:29 所属栏目:百科 来源:网络整理
导读:我有以下代码: mx:Repeater id="showNames" dataProvider="{parentApplication.bfa1aStudents}" mx:Text text="{parentApplication.getStudentName(showNames.currentItem)}" color="#8ab534" click="nameSelected(Number(showNames.getRepeaterItem(showNa
我有以下代码:

<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>

我知道你不能在点击上使用currentItem或currentIndex …并且这个问题是通过getRepeaterItem()函数修复的,但我不确定如何使用它. DP是一堆数字,如果重要,则表示用户ID.如果有人可以帮我解决文本的“点击”部分,我们将不胜感激.

解决方法

尝试使用event.currentTarget.getRepeaterItem()来代替showNames

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读