Hi,

      var className = "qx.ui.form.SelectBox";
      var clazz = qx.Class.getByName(className);
      if (!clazz) throw new Error("Class " + className + " not exists");

      var instance = new clazz();

-- 
Best regards
- Petr Kobalicek <http://kobalicek.com>


On Mon, Jun 14, 2010 at 7:41 PM, 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.
>
> ed
>
>
> ------------------------------------------------------------------------------
> 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
>

------------------------------------------------------------------------------
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

Reply via email to