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

Key: LPP-3167
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: P1 P1
Assignee: Mamye Kratt
Reporter: Philip Romanik
Votes: 0
Watchers: 1
Operations

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

Initialization difference between swf and dhtml

Created: 28/Nov/06 11:03 AM   Updated: 28/Dec/06 03:53 PM
Component/s: Laszlo Foundation Classes (LFC)
Affects Version/s: Legals PR4
Fix Version/s: OL4B1, 4.0.0

Time Tracking:
Not Specified

Severity: Major
Fixed in Change#: 2,897
Runtime: N/A
Fix in hand: False


 Description  « Hide
I found an initialization difference between swf and dhtml. This is the
sample code:

<canvas width="600" height="600">
   <view id="vw" bgcolor="blue" width="100" height="100" >

     <handler name="onwidth" >
       this.setBGColor(0xFF0000)
     </handler>
    </view>
</canvas>

When run with swf, the color displayed is red. When run with dhtml the
color is blue. setBGColor() is called twice in both cases. In swf the
background color is set to blue, and then the event handler changes it to
red. In dhtml, it is just the opposite.

The code is based upon a laszlo-in-10 example (Scripting->Event handling).
In trunk it shows as blue.


Max's comment (via email):

I think the root of this is that attributes are set in a different order
  - just like the issue we had with early setters. We need a way to
keep attribute setting order consistent - iterating over an array should
be faster than for..in anyway.

The problem is, the node constructor expects an object to specify
attributes. Changing this will break a lot of things.


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
P T Withington - 06/Dec/06 05:14 AM
r2897 | hqm | 2006-12-05 19:55:38 -0500 (Tue, 05 Dec 2006) | 29 lines
Changed paths:
   M /openlaszlo/branches/legals/WEB-INF/lps/lfc/core/LzNode.lzs
   M /openlaszlo/branches/legals/WEB-INF/lps/lfc/core/UserClass.lzs
   M /openlaszlo/branches/legals/WEB-INF/lps/lfc/events/LaszloEvents.lzs
   M /openlaszlo/branches/legals/WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassCompiler.java
   M /openlaszlo/branches/legals/WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
   M /openlaszlo/branches/legals/WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java
   M /openlaszlo/branches/legals/WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema_Test.java

Change 20061205-hqm-2 by hqm@IBM-112E6A12815 on 2006-12-05 18:14:46 EST
    in /cygdrive/c/users/hqm/openlaszlo/branches/legals

Summary: events cleanup, events deferral while init'ing a node

New Features:

Bugs Fixed:

Technical Reviewer: ptw, max(pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:

+ make compiler emit all event handlers on the $delegates list where some of them already live,
and reclaim $events to properly declare the default event handler.


+ defer events while init'ing a node
    
+ misc unrelated fix to baselist


Tests:

P T Withington - 06/Dec/06 05:16 AM
To QA for verification. If you need more information on how to verify, please ask PhilR for details.

Mamye Kratt - 28/Dec/06 03:53 PM
(4.0b1 build - 3172)
Closed.
Also duplicate of LPP-3140