Until now I haven't found this "optimization", see i.e. this simple testcase. It will only print the "undefined property"-warning for "cundef" and for "attrundef" (just SWF-Runtime, in DHTML it'll print "(void 0)" for the undefined values without any warnings; tested in FF2, IE6, Opera9 on wafflecone)

[code]
<canvas debug="true" >
 <attribute name="cundef" />
 <attribute name="cnull" value="null" />

 <class name="test" >
   <attribute name="attrundef" />
   <attribute name="attrnull" value="null" />
 </class>

 <test id="foo" />

 <handler name="oninit" >
   Debug.write("canvas.cundef=%w", canvas.cundef);
   Debug.write("canvas.cnull=%w", canvas.cnull);
Debug.write("foo.attrundef=%w", foo.attrundef);
   Debug.write("foo.attrnull=%w", foo.attrnull);
 </handler>

</canvas>
[/code]

P T Withington wrote:
There may be a (n incorrect) optimization in the compiler that drops null attributes thinking they are equivalent to undefined (which they clearly are not).

---
L'iPhone, c'est moi.

On Aug 25, 2007, at 4:50 PM, André Bargull <[EMAIL PROTECTED]> wrote:

Actually, there shouldn't be any warnings, since "_widthdel" and "_heightdel" are both defined as "null" and not as "undefined" (see l.44 resp. l.46 in basefocusview.lzx). However, if you want me to change the if-clauses for "_widthdel" and for "_heightdel", I'd suggest I'll also change the if-clause for "_xydelegate", so we use the same pattern to check for "null" / "undefined" values.

André


Max Carlson wrote:
Welcome aboard - it's great having you as a committer!

Approved, provided you change lookups to prevent warnings, e.g.:

if ( !this._widthdel )

should be
if ( !this['_widthdel'] )

André Bargull wrote:
Change 20070825-bargull-6 by [EMAIL PROTECTED] on 2007-08-25 16:48:55
in /home/Admin/src/svn/openlaszlo/branches/wafflecone
for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone

Summary:
Fixed tracking in basefocusview

New Features:

Bugs Fixed:
LPP-4553 "basefocusview warnings when canvas size changes"

Technical Reviewer: max
QA Reviewer: ben
Doc Reviewer: (pending)

Documentation:
The whole width/height tracking was broken for basefocusview, this is now fixed.

Release Notes:

Details:

Tests:
Two testcases can be found at the bugreport (LPP-4553)

Files:
M lps/components/base/basefocusview.lzx

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070825-bargull-6.tar




--
Official OpenLaszlo-Committer ^_^


--
Official OpenLaszlo-Committer ^_^

Reply via email to