New event syntax in OpenLaszlo
April 10th, 2006If you follow OpenLaszlo news closely, you may have noticed that a new event syntax is available in OpenLaszlo 3.2 which makes specifying and handing your own events more straightforward. I think the folks at Laszlo Systems made a smart move in adopting the new syntax as it is more intuitive, and will reduce confusion for new developers.
Curiously, the only documentation I found describing the new syntax was in this feature proposal, and in the nightly builds of the reference guide and the developers guide. Somehow the new syntax is missing from the shipping 3.2 docs.
In a nutshell the syntax is:
<event name="onMyEvent"/>- Declare an event<handler name="onMyEvent">
//some code here to handle event
</handler>-
onMyEvent.sendEvent()- notify event listeners that the event fired
Kudos to the OpenLaszlo folks for continuing to evolve the language.


