New event syntax in OpenLaszlo

If 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.

One Response to “New event syntax in OpenLaszlo”

  1. John Sundman Says:

    Chris,

    I’m working documentation for this right now, including updating all the examples in the doc to use the new syntax. This will be showing up in the nightly builds soon.

    jrs

Leave a Reply

Please copy the string EofFUF to the field below: