Hi Chen,
Sorry, pressed the ³send² button to early.
var vv = new lz.myclass(canvas, {width:200, height:300, bgcolor:0x999999},
[]);
The release notes mention that change:
http://www.openlaszlo.org/lps4.1/docs/release-notes.html
> OpenLaszlo 4.1 has two major changes that may require your attention. A
> summary is provided below. Complete details and additional information on the
> differences between the SWF and DHTML runtimes can be found on the OpenLaszlo
> Wiki: http://wiki.openlaszlo.org/Runtime_Differences.
>
> In OpenLaszlo 4.1, user classes are no longer defined as part of the global
> namespace. This gives OpenLaszlo better interoperability with other
> frameworks. In your application, user classes defined as:
>
> <class name="Foo" .../>
> <new foo(...)
>
> will need to be changed to:
>
> new lz.foo (...)
>
> A script has been posted by Sebastian Wagner to help convert user classes. It
> can be found here: http://code.google.com/p/laszlo4converter/.
>
> In addition, warnings may now appear if you are using deprecated syntax in
> your application. OpenLaszlo 4.1 includes a perl conversion script
> (convert_laszlo.pl) to help mitigate these warnings.
Best,
Raju
Am 27.07.2008 11:32 Uhr schrieb "Raju Bitter" unter
<[EMAIL PROTECTED]>:
> Relplace your line with this code and it will work:
>
>
>
> Am 27.07.2008 11:18 Uhr schrieb "Chen Ding" unter <[EMAIL PROTECTED]>:
>
>> <canvas debug="true">
>> <debug y="600"/>
>>
>> <class name="myclass"/>
>>
>> <button x="100" y="100" text="Create">
>> <handler name="onclick">
>> var vv = new myclass(canvas, {width:200, height:300,
>> bgcolor:0x999999}, []);
>> </handler>
>> </button>
>>
>> <myclass x="300" y="100" width="100" height="100" bgcolor="red"/>
>> <view x="500" y="100" width="100" height="100" bgcolor="blue"/>
>> </canvas>
>