I have a hard time imagining when you don't have that option. Maybe if the user gets to choose from a form input...
On Tue, Nov 10, 2009 at 4:17 PM, Ryan Florence <[email protected]> wrote: > > 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 >>>> >>>
