lbjvg (2) [Avatar] Offline
#1
I typed the "Hello Laszlo" code on page 12 into the OpenLaszlo Explorerand it did not compile.

The code from pg 12smiliebold text highlights differences.)

<canvas width="300" height="200" bgcolor="0xBDDDF0">
<button text="Press" onclick="parent.msg.setText("Hello Laszlo")">
<text name="msg" x="60"/>
</canvas>

I played with it for some time to come up with this, which did compile:

<canvas>
<button text="Press" onclick="msg.setText('Hello Laszlo')">
<text name="msg" x="60"/>
</button>
</canvas>

The differences are: "parent" is removed; Hello Laszlo is in single quotes; and the button tag is closed.

I guess this is just errata FYI.

Thanks, JV Gallagher

Message was edited by:
lbjvg