> It always returns 'class object' No, it can also return a Function if you pass something like "flash.utils.getTimer", which is a package-level function that isn't in any class. Since the return value can be either a Function or Class, we had type it as Object.
- Gordon ________________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of tyombria Sent: Thursday, June 22, 2006 6:10 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex Beta 3: getDefinitionByName >From docs: public function getDefinitionByName(name:String):Object Returns a reference to the class object of the class specified by the name parameter. It always returns 'class object' - instance of the Class class. Why getDefinitionByName returns Object type? I must always write: var ClassRef : Class = Class( getDefinitionByName(class) ); var instance : Object = new ClassRef(); but i might have: var ClassRef : Class = getDefinitionByName(class); var instance : Object = new ClassRef(); ------------------------ Yahoo! Groups Sponsor --------------------~--> Yahoo! Groups gets a make over. See the new email design. http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/nhFolB/TM --------------------------------------------------------------------~-> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/