Oh, if it is a getter then just use ClassRef[getter] as in:
trace(ClassRef[getter]); Alex Harui Flex SDK Developer Adobe Systems Inc.<http://www.adobe.com/> Blog: http://blogs.adobe.com/aharui From: [email protected] [mailto:[email protected]] On Behalf Of Sefi Ninio Sent: Monday, March 02, 2009 10:12 PM To: [email protected] Subject: Re: [flexcoders] static function and getDefinitionByName It has a few private static members, and a few public static getter functions that manipulate the private members (no arguments on any of the functions). Nothing out of the ordinary. I get the fully qualified class name, and the static getter to be executed - at run time via XML. I use the class name to create a Class instance, and then I tried ClassRef[getter](); Nothing. When I debug it, the debugger doesn't event break on the breakpoint in the getter. On Tue, Mar 3, 2009 at 12:58 AM, Alex Harui <[email protected]<mailto:[email protected]>> wrote: What does the class definition look like? I’m pretty sure I’ve used this successfully. Alex Harui Flex SDK Developer Adobe Systems Inc.<http://www.adobe.com/> Blog: http://blogs.adobe.com/aharui From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of Sefi Ninio Sent: Monday, March 02, 2009 5:10 AM To: [email protected]<mailto:[email protected]> Subject: Re: [flexcoders] static function and getDefinitionByName Hi Alex. I actually tried that, it doesn't work... On Mon, Mar 2, 2009 at 8:13 AM, Alex Harui <[email protected]<mailto:[email protected]>> wrote: ClassRef[“staticFunctionName”]() Alex Harui Flex SDK Developer Adobe Systems Inc.<http://www.adobe.com/> Blog: http://blogs.adobe.com/aharui From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of Sefi Ninio Sent: Sunday, March 01, 2009 2:07 PM To: [email protected]<mailto:[email protected]> Subject: [flexcoders] static function and getDefinitionByName Hi. I am using getDefinitionByName from flash.utils to get a class definition / instance from a string: var ClassRef:Class = getDefinitionByName(className) as Class; That works great, I can create an instance if I want. Problem is, I need to call a static function on that ClassRef class, and I'll know the function name only at runtime from XML. Any idea on how to do this?

