RE: [flexcoders] Re: Dynamic constructor invocation?

2007-04-07 Thread Alex Harui
D] On Behalf Of Christophe Herreman Sent: Friday, April 06, 2007 11:55 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Dynamic constructor invocation? Hi again, the solution I have so far is to make separate calls for each number of arguments that needs to be passed to the constructo

Re: [flexcoders] Re: Dynamic constructor invocation?

2007-04-06 Thread Christophe Herreman
Hi again, the solution I have so far is to make separate calls for each number of arguments that needs to be passed to the constructor. It works, but of course it is no elegant and generic solution. case 1: result = new clazz(args[0]); break; case 2: result = new clazz(args[0], args[1]);

[flexcoders] Re: Dynamic constructor invocation?

2007-04-06 Thread herrodius
Hi Paul, I'm currently also creating a lightweight IoC container. You can get a ref to the Class by calling getDefinitionByName(). getClassByName() is indeed not there. About the ObjectFactory, do you mean creating wrappers around the constructor call for every number of arguments? You can always

[flexcoders] Re: Dynamic constructor invocation?

2007-04-06 Thread Paul DeCoursey
I was looking into this, because I wanted to do some IoC work in Flex. I found one issue, I don't have any reference for getClassByName adn cannot compile when trying to use it. Was it removed? what's the deal there? Anyway, one solution I had thought of was to use a ObjectFactory of sorts. T