Agreed,
We use a similair system to create instances from strings at runtime. In
our main class we have this line of code:
Components;
The class components look like this:
class Components
{
public function Components()
{
package.Component1;
package.Component2;
};
};
This way, we are able to instantiate the classes inside Components.as at
runtime via a string. Eventually Components.as will be generated by
ColdFusion before the Flex application is loaded.
Greetz Erik
-----Original Message-----
From: Dirk Eismann [mailto:[EMAIL PROTECTED]
Sent: woensdag 6 april 2005 11:04
To: [email protected]
Subject: RE: [flexcoders] Re: createChild dynamically via DB arguments..
Hi Abdul,
> I think, mx.utils.ClassUtil.findClass("") would only work when class
> definition is present in app...
yeah, that's right. I think Scott's code snippet implies that he has the
classes compiled into the SWF file - otherwise it wouldn't work for him
:)
> > say you have a situation like this
> >
> > var x = com["str1"]["str2"]["str3"];
> >
> > container.createChild(x);
> >
> > that works ok.
Dirk.
Yahoo! Groups Links
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/