This content has been marked as final. Show 4 replies
Greg, I don't know of a way to interpret a string value and execute it as code in ActionScript. What you could try is to create additional attributes within the XML document that identify the component name, property to be changed, and value. To get this to work, one has to write some seriously brittle code. Is this just an exercise or may I ask what the purpose of it is?
That is cleaner than my example, so I Will not add mine.
But you might also try the 'apply' method of the Function class as well.
You can also write a string2function method (I had an AS2 one) or you might try to use a SOAP like convention to encode/decode your string functions.
The short answer is you need the 'eval' function back. :)
VarioPegged, I was replying to someone elses post and this was the only thing I couldn't get to work. They were creating a UI from an XML file, so I can't claim knowledge of why they were doing this, or if it is desirable, but thanks for your guys posts.
Thanks guys. I am interested in building UI components depending on data in database, probably Greg is referring to my earlier post. The possible business requirement here could be say if I have certain number of dimensions in my data warehouse, I will show values from those dimensions in combo boxes but I also need to know how many combo boxes I need to create. This is a very general requirement for any reporting tool.