On Mon, Jun 14, 2010 at 13:41, ed <[email protected]> wrote:
> This is probably a Javascript question as opposed to a qooxdoo question
> but I can't seem to find a definite answer so I thought I'd try anyway.
>
> I realize that I can code the following:
>
> var login = new qx.ui.form.SelectBox();
>
> Is there anyway to accomplish:
>
> var objName = "qx.ui.form.SelectBox";
> var login = new objName();
>
> i.e. have a variable contain the name of the class I am trying to
> create. Thanks.
>
In addition to the means of doing it with strings as Petr demonstrated, you
can also assign a class or method to a variable, and then use it directly:
var methodName = qx.ui.form.SelectBox;
var login = new methodName();
Derrell
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel