[Laszlo-dev] For Review: Change 20061211-Philip-6 Summary: Modify l-in-10 scripting->event application
Philip Romanik
promanik at laszlosystems.com
Mon Dec 11 12:54:31 PST 2006
Change 20061211-Philip-6 by Philip at Philip-DC on 2006-12-11 15:42:37 EST
in /cygdrive/f/laszlo/svn/src/svn/openlaszlo/branches/legals
Summary: Modify l-in-10 scripting->event application
New Features:
Bugs Fixed: LPP-3247
Technical Reviewer: ptw
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
The existing app doesn't work as intended because of an initialization
issue. The onwidth() event is fired during initialization and this turns
the view blue. The intent of the demo is to show an event being fired when
the user clicks on a button.
My first thought was to make sure the object was fully initialized before
enabling the onwidth event. The problem is that it will make the app look
more complicated. I took an easier route and changed the onwidth() method
to only turn the view red if the size changes from the initial value. There
are lots of ways to solve this issue and the simplest is to hard-wire the
initial width into a conditional. I changed
<handler name="onwidth" >
this.setBGColor(0xFF0000);
</handler>
to
<handler name="onwidth" >
if (this.getWidth() != 100)
this.setBGColor(0xFF0000);
</handler>
This change requires no explanation to the reader.
Release Notes:
Details:
Tests:
Run l-in-10 scripting->events in swf and flash
Files:
M laszlo-explorer/scripting/events.lzx
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20061211-Philip-6.tar
More information about the Laszlo-dev
mailing list