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 send me
code offlist ([EMAIL PROTECTED]). If you are interested in my
progress I can send you some stuff to.

regards,
Christophe

--- In flexcoders@yahoogroups.com, "Paul DeCoursey" <[EMAIL PROTECTED]> wrote:
>
> 
> 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.  Then you pass in an array of arguments to a getInstance
> function and it would use the correct call based on the length of the
> array.  It would be more code but it would be hidden away in a factory
> class.  If you need an example let me know.
> 
> Paul
> --- In flexcoders@yahoogroups.com, "herrodius" <lists@> wrote:
> >
> > Hi guys,
> > 
> > I'm looking for a way to dynamically invoke a constructor and pass in
> > arguments. I know this was possible in AS2 with
> > Function.apply() on the constructor property of an object but I didn't
> > find anything in AS3.
> > 
> > I found a 1-year old post from Matt Chotin that says it wouldn't be
> > possible in AS3, but I was kinda hoping it might have magically
> > changed by now ;-)
> > http://www.mail-archive.com/flexcoders@yahoogroups.com/msg21919.html
> > 
> > Any tips?
> > 
> > thx,
> > Christophe
> >
>


Reply via email to