[Laszlo-checkins] r9352 - openlaszlo/trunk/WEB-INF/lps/lfc/helpers

bargull@openlaszlo.org bargull at openlaszlo.org
Wed May 28 09:38:51 PDT 2008


Author: bargull
Date: 2008-05-28 09:38:47 -0700 (Wed, 28 May 2008)
New Revision: 9352

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzState.lzs
Log:
Change 20080525-bargull-5eb by bargull at dell--p4--2-53 on 2008-05-25 21:47:14
    in /home/Admin/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Fix state warnings

New Features:

Bugs Fixed: LPP-6047

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

Documentation:

Release Notes:

Details:
Update call to "setVisible" and delegate for "apply".
    

Tests:



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzState.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzState.lzs	2008-05-28 16:34:38 UTC (rev 9351)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzState.lzs	2008-05-28 16:38:47 UTC (rev 9352)
@@ -160,7 +160,7 @@
       if ( this.isinited ){
         this.apply();
       } else {
-        new LzDelegate( this , "apply" , this , "oninit" );
+        this.applyOnInit = true;
       }
     } else {
       if ( this.isinited ){
@@ -224,6 +224,8 @@
   var releasedconstraints;
   /** @access private */
   var appliedChildren;
+  /** @access private */
+  var applyOnInit :Boolean = false;
 
   /**
    * @access private
@@ -234,6 +236,16 @@
     this.handlerMethodNames = {};
     this.appliedChildren = [];
   }
+  
+  /**
+   * @access private
+   */
+  override function init () {
+    super.init();
+    if (this.applyOnInit) {
+      this.apply();
+    }
+  }
 
   /**
    * @access private
@@ -282,12 +294,14 @@
 
     // release any constraints you are about to override
     var pia = parent._instanceAttrs;
-    for (var key in this.heldArgs) {
-      if (pia && pia[key] is LzConstraintExpr) {
-        if (this.releasedconstraints == null) { this.releasedconstraints = []; }
-        var constraintMethodName = pia[key].methodName;
-        if (parent.releaseConstraintMethod(constraintMethodName)) {
-          this.releasedconstraints.push(constraintMethodName);
+    if (pia) {
+      for (var key in this.heldArgs) {
+        if (pia[key] is LzConstraintExpr) {
+          if (this.releasedconstraints == null) { this.releasedconstraints = []; }
+          var constraintMethodName = pia[key].methodName;
+          if (parent.releaseConstraintMethod(constraintMethodName)) {
+            this.releasedconstraints.push(constraintMethodName);
+          }
         }
       }
     }
@@ -573,7 +587,7 @@
    * @access private
    */
   function __LZdetach ( aview ){
-    aview.setVisible( false );
+    aview.setAttribute("visible", false);
     return aview;
   }
 
@@ -581,7 +595,7 @@
    * @access private
    */
   function __LZretach ( aview ){
-    aview.setVisible( true );
+    aview.setAttribute("visible", true);
     return aview;
   }
 



More information about the Laszlo-checkins mailing list