[Laszlo-user] create a class by name

Elliot Winard enw at laszlosystems.com
Fri Oct 12 11:29:35 PDT 2007


You should be able to just say the following in Javascript -
  new TestClass();

Much cleaner than the loader.request(....).  :)
-e

Ruben Reusser wrote:
> Hi:
>
> Is it possible to create a class by name in OpenLaszlo? I tried:
>
> eval("new TestClass()");
>
> but this does not work. The only solution I could find was the following:
>
> loader.request( { lz_load : false,lzt : "eval",proxied: true,url: 
> "__debugger.lzx",lz_script : "#file interactive-eval-0\nnew 
> TestClass()"} );  
>
> not my favorite approach.
>
> Ruben
>


More information about the Laszlo-user mailing list