
|
If you were logged in you would be able to see more operations.
|
|
|
| Severity: |
Major
|
| Fixed in Change#: |
2,897
|
| Runtime: |
N/A
|
| Fix in hand: |
False
|
|
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.
|
|
Description
|
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.
|
Show » |
|
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: