1 person found this helpful
That is correct. Id is setup by generated code for mxml.
Declare variables and assign dynamically created instances to those
That cannot be true! So id parameter is completely useless for anything created dynamically??? There is no comand something like super.updateIdList() to include new id's? I 've seen many time in tutorials code in the internet that people assign ids to dynamically created components, are they doing it purpuslesly?
If you set the id property on a dynamically created instance, you can check
the id of an instance later if it happens to be a target of an event, for
example. But it will not be assigned to a variable in the document.
By default, MXML generates a non-dynamic class so you can't add properties
to it at runtime. You can set the name property and search the immediate
parent by calling getChildByName, but if the parent is not the document, you
still can't search the document.