惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
S
Securelist
MyScale Blog
MyScale Blog
Jina AI
Jina AI
罗磊的独立博客
The Cloudflare Blog
美团技术团队
博客园 - 叶小钗
阮一峰的网络日志
阮一峰的网络日志
博客园 - 三生石上(FineUI控件)
月光博客
月光博客
雷峰网
雷峰网
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
博客园 - Franky
博客园 - 聂微东
Y
Y Combinator Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MongoDB | Blog
MongoDB | Blog
T
Tailwind CSS Blog
Attack and Defense Labs
Attack and Defense Labs
博客园_首页
Latest news
Latest news
Apple Machine Learning Research
Apple Machine Learning Research
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Hacker News
The Hacker News
G
GRAHAM CLULEY
Simon Willison's Weblog
Simon Willison's Weblog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
U
Unit 42
D
Docker
Webroot Blog
Webroot Blog
N
Netflix TechBlog - Medium
T
Tor Project blog
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LINUX DO - 最新话题
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
B
Blog
Recent Announcements
Recent Announcements
GbyAI
GbyAI
Microsoft Azure Blog
Microsoft Azure Blog
Security Latest
Security Latest
V2EX - 技术
V2EX - 技术
N
News | PayPal Newsroom
Microsoft Security Blog
Microsoft Security Blog

博客园 - 昊子

工作流参考模型(Workflow Reference Model) DNN default document的异常错误 如何使用GoogleCode提供的SVN Source Control服务 Norton PartitionMagic 8.0 Resizing Boot Partition 智能提示和那些值得崇拜的人 推荐一个Flex & AIR皮肤站点 SessionDiskCache 0.1版发布 Flex locale 从没走远 SubmitMask 1.0 发布 如何获取Footer中的子控件 DNN学习笔记 之一 配置 使用NHibernate时产生的一个错误 NHibernate官方文档 之 NHibernate指南-前言 C#反转单向链表 C#事件编程 静态构造函数和静态成员变量初始化的调用时间 NHibernate和SqlImage 结束无谓的讨论吧
Flex Repeater 多层嵌套
昊子 · 2007-07-08 · via 博客园 - 昊子

多層Repeater嵌套控件訪問問題
多層嵌套可以直接通過控件ID訪問同名控件的多維數組
但數組維度固定,如有例外則無法通過此方法訪問

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
 <mx:Script>
  <![CDATA[
   
   [Bindable]
   public var temparray:Array = [1,2,3]
   
   
   public function btn_click():void
   {
    //trace (btn[2][2][2]);
    trace (btn);
   }
  ]]>
 </mx:Script>
 <mx:Repeater id="r1" dataProvider="{temparray}" >
  <mx:Repeater id="r2" dataProvider="{temparray}" >
   <mx:Repeater id="r3" dataProvider="{temparray}" count="{r2.currentIndex+1}" >
    <mx:Button id="btn" click="btn_click()" />
   </mx:Repeater>
   
  </mx:Repeater>
 </mx:Repeater>
</mx:Application>

結果
,Repeater0.btn[0][1][0],Repeater0.btn[0][1][1],btn[0][2][2],Repeater0.btn[0][2][0],Repeater0.btn[0][2][1],Repeater0.btn[0][2][2],,Repeater0.btn[1][1][0],Repeater0.btn[1][1][1],btn[1][2][2],Repeater0.btn[1][2][0],Repeater0.btn[1][2][1],Repeater0.btn[1][2][2],Repeater0.btn[2][0][0],Repeater0.btn[2][1][0],Repeater0.btn[2][1][1],Repeater0.btn[2][2][0],Repeater0.btn[2][2][1],Repeater0.btn[2][2][2]

btn[0][0] btn[1][0] btn[2][0]無法通過 ID訪問