flex - creating a dynamicly named object -


I am trying to create a dynamic named object.

something like

  private var myVar: string = "dynamic name"; Private var [myVar + "staticName"]: object = new object;  

But for some reasons I did not write the above work.

I would be surprised if you do it.

Better to save a dynamically created object in an array or possibly a dictionary. Flex framework uses arrays for item renders in list based classes, for example try in a way that uses a dictionary:

  private var myObjects: Dictionary = new Dictionary ()  

In some ways where you make children:

  private var myVar: string = "dynamic name"; MyObjects [myVar + "staticName"] = new object ();  

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -