[Laszlo-dev] For Review: Change 20070111-ptw-j Summary: Refined event deferral
P T Withington
ptw at pobox.com
Fri Jan 12 05:42:03 PST 2007
Combobox is working, but not the others. And the swf debugger blows
up with this. Digging...
On 2007-01-11, at 19:39 PST, P T Withington wrote:
> [Max, I was finally able to refine my debugging and I realized we
> were just deferring too broadly. This change makes it so _only_
> events that would be sent to the node under initialization are
> deferred. With this change, the components work again. I still
> have the event debug printing on in this change, so be prepared for
> a lot of output if you test this change with debugging on. You can
> comment the Debug.debug calls out of LaszloEvents if that is too
> Change 20070111-ptw-j by ptw at 18.104.22.168.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)
> 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.
> 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
> 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
> 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
> These components all work now:
> 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" >
> 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
> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070111-
More information about the Laszlo-dev