[Laszlo-dev] [UPDATED]] For Review: Change 20070111-ptw-j Summary: Refined event deferral
Max Carlson
max at openlaszlo.org
Sat Jan 13 12:35:05 PST 2007
Approved as is - it makes a lot of components work again in DHTML also.
This is huge progress!
-Max
P T Withington wrote:
> [Max, here's where I got to before heading to the plane. I will
> continue to work on it on the plane, so if you have better things to do,
> don't waste your time here. With this refinement, all the broken
> components work except menu in swf. I am also now only printing debug
> info when deferring and event actually results in a deferral (i.e., I
> don't print info if the deferred event had no delegates). This way we
> can see exactly when the deferral results in different behavior. It was
> gratifying to see that the original bug case defers only the event that
> was getting screwed, and does so for both runtimes.]
>
> Change 20070111-ptw-j by ptw at 191.154.150.10.in-addr.arpa on 2007-01-11
> 19:12:09 PST
> in /Users/ptw/OpenLaszlo/legals-2
>
> Summary: Refined event deferral
>
> Bugs Fixed:
> LPP-?: 'Legals branch and Broken Components'
>
> Technical Reviewer: max (pending)
> QA Reviewer: platform-team (pending)
> Doc Reviewer: jsundman (pending)
>
> Documentation:
>
> Events that would be sent to a node when the node is being
> constructed (typically events that would be triggered by
> initializing the attributes of the node) are deferred until the
> node's attributes are fully initialized.
>
> Release Notes:
>
> This is a change from previous behavior, where the initialization
> of a node attribute could cause an event to be sent to the node
> when the node was partially initialized. This was an
> underspecified area of the LZX language which lead to hazards in
> some runtimes. This change should not affect the behavior of
> existing programs.
>
> Details:
>
> LzMessage: Fix append to not escape strings, so that %w can print
> strings escaped by default (so you can tell the difference
> between `true` and `"true"`).
>
> LzDebug.*: Changed the behavior of __String so that if 'pretty'
> output is requested instance UID's are not printed, even for
> objects that have ambiguous representations. By default '%w'
> requests pretty output. You can use '%#w' to force uid's to be
> printed.
>
> LzFormat: Removed hazards where format tried to interpret the
> value to be displayed as a Number or String prematurely.
>
> LaszloCanvas, LzNode: For the purposes of testing this change, you
> can set the canvas attibute __LZhenryWasRight to true or false to
> enable or disable the deferral of events during node
> initialization.
>
> LzNode, LaszloEvents: Event deferral is refined in this change to
> _only_ defer events that would be sent to the node under
> initialization. Previously, all events sent during a node's
> initialization would be deferred. This meant that even nodes that
> were already initialized or standalone events were deferred, which
> appears to have been the cause of the lossage in components.
>
> LzNode: Also over-rode _dbg_typename so that node's will print in the
> debugger with their 'lz' package name.
>
> Class: Make the Instance method for _dbg_typename overridable
>
> Tests:
> These components all work now:
>
> examples/components/combobox_example.lzx?lzr=dhtml
> examples/components/form_example.lzx?lzr=dhtml
> examples/components/list_example.lzx?lzr=dhtml
> examples/components/menu_example.lzx?lzr=dhtml
>
> This test (the original bug that sent us down this path) also
> works the same in swf and dhtml:
>
> <canvas width="600" height="600">
> <view id="vw" bgcolor="blue" width="100" height="100" >
>
> <handler name="onwidth" >
> this.setBGColor(0xFF0000)
> </handler>
> </view>
> </canvas>
>
> Files:
> M WEB-INF/lps/lfc/debugger/LzMessage.lzs
> M WEB-INF/lps/lfc/debugger/platform/swf/LzDebug.as
> M WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js
> M WEB-INF/lps/lfc/debugger/LzFormat.lzs
> M WEB-INF/lps/lfc/core/LzNode.lzs
> M WEB-INF/lps/lfc/core/Class.lzs
> M WEB-INF/lps/lfc/views/LaszloCanvas.lzs
> M WEB-INF/lps/lfc/events/LaszloEvents.lzs
> M WEB-INF/lps/lfc/compiler/LzRuntime.lzs
>
>
> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070111-ptw-j.tar
--
Regards,
Max Carlson
OpenLaszlo.org
More information about the Laszlo-dev
mailing list