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
  • onMyEvent.sendEvent() – notify event listeners that the event fired

Kudos to the OpenLaszlo folks for continuing to evolve the language.

One thought on “New event syntax in OpenLaszlo

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


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s