I was doing this once upon a time and then realized it is just as easy, if not easier, to pass the class around instead of a string that represents it.

Of course, sometimes you don't have that option.

Sent from my iPhone

On Nov 10, 2009, at 6:25 PM, Jon Hancock <[email protected]> wrote:


thanks, that does the trick!!!

On Nov 10, 6:14 pm, Aaron Newton <[email protected]> wrote:
new window[classNameString]();

assuming it's at the glogal namespace.



On Tue, Nov 10, 2009 at 3:10 PM, Jon Hancock <[email protected]> wrote:

I have a string which represents a name of a class defined using
mootools Class.
I can't figure out how to create an instance based on this string
name.

The following does not work:
new (classNameString)();

Any ideas?
thanks, Jon

Reply via email to