History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-3963
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: -- --
Assignee: Unassigned
Reporter: Zvi Schreiber
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

Regression: state onapply not alwasy fired in 4.x

Created: 11/May/07 11:37 PM   Updated: 05/Feb/08 12:37 PM
Component/s: Components - all
Affects Version/s: 4.0.2
Fix Version/s: RingDing (4.1)

Time Tracking:
Not Specified

Environment: Windows

Severity: Major
Fixed in Change#: 5,064
Runtime: N/A
Fix in hand: False


 Description  « Hide
Try this on the latest nightly build:

<canvas>
<state apply="${true}" onapply="Debug.write('Does not appear in OL4.x')"/>
</canvas>

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
P T Withington - 14/May/07 01:50 PM
I suspect this is due to the new init order mechanism. Investigating.

P T Withington - 17/May/07 05:23 AM
r5064 | ptw | 2007-05-17 08:22:28 -0400 (Thu, 17 May 2007) | 34 lines
Changed paths:
   M /openlaszlo/branches/legals/WEB-INF/lps/lfc/core/LzNode.lzs
   M /openlaszlo/branches/legals/WEB-INF/lps/lfc/helpers/LzState.lzs

Change 20070514-ptw-Y by ptw@dueling-banjos.local on 2007-05-14 20:33:04 EDT
    in /Users/ptw/OpenLaszlo/legals-1
    for http://svn.openlaszlo.org/openlaszlo/branches/legals

Summary: Make LzState behave better

Bugs Fixed:
LPP-3963: 'Regression: state onapply not alwasy fired in 4.x'

Technical Reviewer: henry (pending)
QA Reviewer: promanik (Message-Id: <6.2.1.2.0.20070514225215.021f7530@na>, Message-Id: <6.2.1.2.0.20070516212251.021f33d0@na>)

Details:
    LzNode: Replace bogus test for function that only works in swf5.
    Simplify this to just not clobber any inherited value.

    LzState: States for the most part want to capture their
    attributes, setters, and handlers and then apply/remove them to
    their parent node. Except for the attributes, setters, and
    handlers that belong to the state itself. The old way of doing
    this was fragile, and in the legals remodularization, broke.

    The new way is for states to just override the (internal) node
    protocol for __LZapply, __LZstoreDelegates, and __LZstoreRefs. In
    the overridden methods, the non-state values are captured and
    recorded, and the state values are passed on to the super method
    to be installed normally.

    This restores the pre-legals behaviour of `onapply` handlers.

Tests:
    Test case from bug now works as expected. ant lztest.

Mamye Kratt - 06/Jul/07 02:24 PM
(4.0 branch (4.0.3) build r 5599)
Debug statement shows in debug window.

Mamye Kratt - 06/Jul/07 02:24 PM
Need to test in legals.

Mamye Kratt - 17/Jul/07 12:07 PM
Need to test in legals.

Mamye Kratt - 05/Feb/08 12:37 PM
(pagan-deities build r 7956 - from legals -> trunk -> pagan-deities)

Message shows in debug window in swf and dhtml.

Message -> Does not appear in OL4.x