The semantics of || (or) are different in rhino 1.5R3 and rhino 1.6R2.

[EMAIL PROTECTED] vendor]$ java -jar /home/ben/lib/rhino1_5R3/js.jar
Rhino 1.5 release 3 2002 01 27
js> print (undefined || 2)
2

[EMAIL PROTECTED] vendor]$ java -jar /home/ben/lib/rhino1_6R2/js.jar
Rhino 1.6 release 2 2005 09 19
js> print (undefined || 2)
true

Right now we run our lztests with rhino 1.5R3. The orbit branch is  
developing with rhino 1.6R2 or 1.6pre3. Tucker, which semantics are  
correct?

To cope with this, we applied this change in LaszloAnimation in the  
orbit branch, r1146.
Index: WEB-INF/lps/lfc/controllers/LaszloAnimation.lzs
===================================================================
--- WEB-INF/lps/lfc/controllers/LaszloAnimation.lzs     (revision 1145)
+++ WEB-INF/lps/lfc/controllers/LaszloAnimation.lzs     (working copy)
@@ -77,7 +77,7 @@
LzAnimator.prototype.calcControlValues = function ( cval ){
      // reset currentValue
-    this.currentValue = cval || 0;
+    this.currentValue = (cval ? cval : 0);




_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to