Antun’s Blog

Notes on OpenLaszlo, LZX and Rich Internet Application Development

Antun’s Blog header image 4

Entries Tagged as 'LZX Tips'

Using the Value Attribute

September 10th, 2008 · 3 Comments

Whether you realize it or not, you often use a subclass of the basevaluecomponent in OpenLaszlo. A typical example is radiobutton (which is used with radiogroup). The example for radiogroup in the OpenLaszlo reference is pretty simple:

<canvas debug="true">
<radiogroup id="group1">
<radiobutton value="1" text="one"/>
[...]

[Read more →]

Tags: LZX Tips

Empty Handlers in OpenLaszlo 4.1

August 28th, 2008 · 1 Comment

The current release of OpenLaszlo doesn’t like empty handler tags. If you compile the following code, you’ll get a compiler warning:

<canvas debug="true">
<handler name="oninit">

</handler>
</canvas>

The warning will say:
“Refusing to compile an empty handler, you should declare the event instead”
This wasn’t the case previously. The warning is intended to educate [...]

[Read more →]

Tags: LZX Tips

Use Commas to Separate Arguments to Debug.write()

August 21st, 2008 · No Comments

When you want to trace something to the Debugger in OpenLaszlo, you can call the Debug.write() method.

Often, you’ll want to write the value of something and a label, so that you can identify that output in the debugger, something like:
Debug.write(”subviews: ” + canvas.subviews);
However, it’s better to to get into a habit of use commas instead [...]

[Read more →]

Tags: LZX Tips