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

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -