Hello all,
Yes it is me back asking more questions about dynamic ActionScript.
Here is my problem, I have this object that I populate a textimput box
Here us some of the code:
[Bindable]
public var sArray:Object = [{Name:"Jane Doe",Age:"26",ID:"5"}];
private function Test():void
{
for(var i:int = 0; i<length.sArray;i++){
var ti1:TextInput = new TextInput();
ti1.editable = false;
ti1.id = "Name__" + sArray[i].ID;
addChild(ti1);
}
}
So now I have this TextInput with the id of Name__5, I would like to
create a function to set the editable to true, so I create somting
like this
private function Enable():void
{
for(var i:int = 0; i<length.sArray;i++){
ti1.id = "Name__" + sArray[i].ID.editable = true;
}
}
at the code:
ti1.id = "Name__" + sArray[i].ID.editable = true;
I am getting a "1050: Cannot assign to a non-reference value" error.
How can I create a id to do somting when it has not been created yet?
Thanks for the help,
timgerr