[Flashcoders] Instanciation with Function.apply

2005-12-01 Thread erixtekila
Hi folks, Is it possible to activate the constructor of a class with Function.apply ? new Class.apply (Class, arguments) ? will work ? I know I could implement an init method that be activated by apply, but… Cheers. --- erixtekila http://blog.v-i-a.net/

Re: [Flashcoders] Instanciation with Function.apply

2005-12-01 Thread Navneet Behal
; } --- Good Luck Navneet - Original Message - From: erixtekila [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Thursday, December 01, 2005 9:07 PM Subject: [Flashcoders] Instanciation with Function.apply Hi folks, Is it possible to activate

Re: [Flashcoders] Instanciation with Function.apply

2005-12-01 Thread erixtekila
Thanks Navneet. I do it like this but it's an horrible hack ;) Shame on you OOP guy ! Le 1 déc. 05, à 18:48, Navneet Behal a écrit : Sure, you can use this: --- function createInstance(clazz:Function, args:Array) { if (!clazz) return null; var result:Object = new Object;