[flexcoders] Flex4: getChildById or getElementById
Hi, Oftentimes I need to check if a component( for example a TextInput) exists before populating it with data. The getChildByName()is the only method I know of that can do this. I wish there was a getChildById() as well, so I wouldn't have to set the name for all my components( could be hundreds )in addition to their id. [ If the component( myComponentId ) doesn't exist: this[myComponentId] throws the RE ReferenceError: Error #1069 and this.contains(myComponentId) doesn't compile of course 1120: Access of undefined property myComponentId. ] I know, Christmas time is over, no more gifts for us from Adobe:) Should I put it on my next flex-xmas list? Or do you guys know about other ways of checking the existence of components? Cheers, Ondina
[flexcoders] Flex4: getChildById or getElementById
Hi, Oftentimes I need to check if a component( for example a TextInput) exists before populating it with data. The getChildByName()is the only method I know of that can do this. I wish there was a getChildById() as well, so I wouldn't have to set the name for all my components( could be hundreds )in addition to their id. [ If the component( myComponentId ) doesn't exist: this[myComponentId] throws the RE ReferenceError: Error #1069 and this.contains(myComponentId) doesn't compile of course 1120: Access of undefined property myComponentId. ] I know, Christmas time is over, no more gifts for us from Adobe:) Should I put it on my next flex-xmas list? Or do you guys know about other ways of checking the existence of components? Cheers, Ondina P.S. My message didn't show up the first time. Hopefully it won't appear twice! If so I'm really sorry.