[Laszlo-dev] Constructing objects from their string name

Philip Romanik promanik at laszlosystems.com
Mon Apr 28 16:42:04 PDT 2008


Hi Tucker,

There is a bug in the tree object caused by code in basetree.lzx:

             var c = this.getChildClass();
             if (c != null) {
                 new c(this, args, null, true);
             }

The dhtml error is TypeError: c is not a constructor.

The code is trying to construct an object given the string name of 
the class, ie:

	new lz.tree.classname

Is the correct fix to do the equivalent of:
	new ConstructorMap[lz.tree.tagname]



More information about the Laszlo-dev mailing list