The MXML id attribute is used by the MXML compiler to generate a
variable on the document class.  If you create components via
actionscript, just assigning the id property will not create that slot
since classes are generally not dynamic.

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Wednesday, November 28, 2007 6:53 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] accessing text property via id



This contains some text and I can access it fine.

grid.getChildren()[1].getChildren()[0].getChildren()[0].text

if I trace grid.getChildren()[1].getChildren()[0].getChildren()[0].id

it says "component" which is the id of the text Container

but if I try to access it like this
component.text

I get this message:
Access of undefined property component

Why can't I access text via the id ?


 

Reply via email to