[Laszlo-checkins] r11993 - in openlaszlo/trunk: WEB-INF/lps/lfc/core docs/src/nav

ptw@openlaszlo.org ptw at openlaszlo.org
Sat Dec 6 09:18:21 PST 2008


Author: ptw
Date: 2008-12-06 09:18:18 -0800 (Sat, 06 Dec 2008)
New Revision: 11993

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs
   openlaszlo/trunk/docs/src/nav/nav.lzx
Log:
Change 20081206-ptw-2 by ptw at dueling-banjos.home on 2008-12-06 08:21:05 EST
    in /Users/ptw/OpenLaszlo/trunk-2/docs/src
    for http://svn.openlaszlo.org/openlaszlo/trunk/docs/src

Summary: Tweak -r11969 init arg behavior

Bugs Fixed:
LPP-7439 Find the root cause of nav tab-pane incorrect bgcolor

Technical Reviewer: a.bargull at intensis.de (Message-ID: <493AA65F.40402 at udo.edu>)
QA Reviewer: jcrowley (pending)

Details:
    I was wrong about legacy constructors overriding constraints.
    They may try, but they should not succeed.  To quote Andre: "(I've
    got the feeling that the original implementation had certain
    issues/bugs, so people added workarounds for those bugs. Now, the
    implementation is fixed, but the workarounds force us to recreate
    the issues/bugs...)"

Tests:
    With nav.lzx reverted to not specify explicit bgcolor for tab
    panes, the panes have the same light gray background as pre
    r11969.

    smokecheck, styles/metasuite lfc/data/alldata



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs	2008-12-06 16:12:59 UTC (rev 11992)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs	2008-12-06 17:18:18 UTC (rev 11993)
@@ -290,10 +290,12 @@
       delete iargs["$datapath"];
     }
 
-    /// See LzNode/construct documentation for the purpose of this
+    ///
+    // See LzNode/construct documentation for the purpose of this
     // filtering/copying
-
-    // Remove the init expressions from the args when calling construct
+    //
+    // Remove the init expressions from the args when calling
+    // construct
     var cargs = this.__LzValueExprs = {};
     for (var key in iargs) {
       var val = iargs[key];
@@ -307,15 +309,18 @@
     // placement, actually end up deleting us!  Bail out.
     if (this.__LZdeleted) { return; }
 
-    // Now put them back, unless they have been overridden
+    // Now put them back
     for (var key in cargs) {
-      // TODO [2008-12-02 ptw] Some legacy constructors appear to
-      // depend on overriding a constraint.  IWBNI the only thing a
-      // constructor could do would be to remove a constant arg that
-      // it had handled.
-      if (! (key in iargs)) {
-        iargs[key] = cargs[key];
-      }
+      // NOTE: [2008-12-05 ptw] Some legacy constructors appear to
+      // depend on insertions to args _not_ overriding constraints
+      // (constraints were not visible to legacy constructors).  IWBNI
+      // the only thing a constructor could do would be to remove a
+      // constant arg that it had handled.  Maybe some day we can add
+      // a deprecation warning if a constraint is clobbering an arg
+      // that has been inserted by a sub-class -- that should be a
+      // clue that the sub-class constructor doesn't _really_ know
+      // what it is doing!
+      iargs[key] = cargs[key];
     }
     this.__LzValueExprs = null;
 
@@ -327,8 +332,8 @@
     if (this.__LZdeleted) { return; }
 
     /**
-     * @todo 2006-05-24 ptw Adam says this is a hack that we should get
-     * rid of.
+     * TODO: [2006-05-24 ptw] Adam says this is a hack that we should get
+     * rid of. [2008-12-05 ptw] Some day!
      */
     this.constructWithArgs( iargs );
 

Modified: openlaszlo/trunk/docs/src/nav/nav.lzx
===================================================================
--- openlaszlo/trunk/docs/src/nav/nav.lzx	2008-12-06 16:12:59 UTC (rev 11992)
+++ openlaszlo/trunk/docs/src/nav/nav.lzx	2008-12-06 17:18:18 UTC (rev 11993)
@@ -43,7 +43,7 @@
 
   <simplelayout axis="y"/>
   <tabs x="5" width="${canvas.width-10}" height="${canvas.height}">
-      <tabpane width="${parent.width}" bgcolor="0xffffff">
+    <tabpane width="${parent.width}">
       Contents
       <view name="search" width="${parent.width}">
         <simplelayout axis="x"/>
@@ -121,7 +121,7 @@
       <button onclick="lz.Browser.loadURL('javascript:lzSetShowInlineExamples(false)')">Hide Examples</button>
 
     </tabpane>
-      <tabpane width="${parent.width}" bgcolor="0xffffff">
+    <tabpane width="${parent.width}">
       Classes
       <view clip="true" height="${parent.parent.height - 50}"
             width="${parent.width-20}">
@@ -131,7 +131,7 @@
           <wheelscrollbar/>
       </view>
     </tabpane>
-      <tabpane width="${parent.width}" bgcolor="0xffffff">
+    <tabpane width="${parent.width}">
       Tags
       <view clip="true" height="${parent.parent.height - 50}"
             width="${parent.width-20}">



More information about the Laszlo-checkins mailing list