You can look up properties and methods by name with o[p] syntax even if
o isn't an instance of a dynamic class.
 
And I'm pretty sure that <mx:Application> wasn't a dynamic class in 1.x.
 
Gordon Smith
Adobe Flex SDK Team

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Wednesday, February 20, 2008 12:49 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] dynamic function Names



As long a "this" is a dynamic object.  In 1.x, mx:Application was
dynamic, in 2+ it is not.

Tracy

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of joshua gatcke
Sent: Monday, February 18, 2008 4:51 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] dynamic function Names

Hi all, after much toil, I have learned that I can have dynamic 
function names doing something like this:

var myFunctionName:String = 'foo';
this[myFunctionName]();

This is awesome! Just thought I would share, but you guys probably 
already knew how to do that ;)

- joshua

 

Reply via email to