This content has been marked as final. Show 5 replies
You can assign 'id' just as you do 'name.'
So assign 'id' and use it instead, no?
Hey, thanks for the reply. The problem is I`m passing "name" or "id" (like u say) as a string back to the parent app.
I can`t work out how to use that string to target the component
var blah:String = "componentID"
blah.someProperty = someValue;
won`t work as far as I know. Need to tell Flex "convert blah to be used as a target"
extend the LoginEvent class to add new property of type UIComponent, add this constructor and while construcitng LoginEvent instance add the referece 'this' reference:
var e:LoginEvent = new LoginEvent("login", this.name, this);
actually, you can get rid of the second parameter as casting 'this' to type of the component would given you access to all of its properties including 'name' property.
so i think Flex can't "convert blah(string) to be used as a target".
as you want
1. you can debug to see how to get id when you call addChild();
2. if you dynamically added components you can use variable name for component to referent.
Atta, that got me going in the right direction, thankyou.
Thanks all for replying.