[Laszlo-checkins] r10038 - in openlaszlo/trunk/WEB-INF/lps/lfc: core data kernel/swf views

bargull@openlaszlo.org bargull at openlaszlo.org
Thu Jun 26 13:49:14 PDT 2008


Author: bargull
Date: 2008-06-26 13:49:07 -0700 (Thu, 26 Jun 2008)
New Revision: 10038

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/core/LzEventable.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapath.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
   openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs
Log:
Change 20080626-bargull-hg0 by bargull at dell--p4--2-53 on 2008-06-26 18:27:21
    in /home/Admin/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: some minor clean-ups

New Features: LPP-6540

Bugs Fixed:

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

Documentation:

Release Notes:

Details:
removed some stale comments and moved data-visibility stuff from LzEventable/LzNode to LzView (where it belongs to).

    

Tests:
code inspection



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/core/LzEventable.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/core/LzEventable.lzs	2008-06-26 20:04:06 UTC (rev 10037)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/core/LzEventable.lzs	2008-06-26 20:49:07 UTC (rev 10038)
@@ -133,7 +133,4 @@
     }
   }
 
-   /** @access private */
-  function __LZupdateShown( ) {}
-
 } // End of LzEventable

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs	2008-06-26 20:04:06 UTC (rev 10037)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs	2008-06-26 20:49:07 UTC (rev 10038)
@@ -54,8 +54,6 @@
   /** @access private */
   var classChildren:Array = null;
   /** @access private */
-  var __LZvizDat:Boolean = true;
-  /** @access private */
   var animators:Array = null;
 
   if ($swf9) {

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapath.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapath.lzs	2008-06-26 20:04:06 UTC (rev 10037)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapath.lzs	2008-06-26 20:49:07 UTC (rev 10038)
@@ -237,11 +237,6 @@
 
     super.construct.apply(this, arguments);
 
-    // construct this to prevent undefined property error
-    if ( ! ('data' in this.immediateparent) ){
-        this.immediateparent.data = null;
-    }
-
     if ( args.datacontrolsvisibility != null ){
         this.datacontrolsvisibility = args.datacontrolsvisibility;
     }
@@ -286,35 +281,24 @@
 override function __LZHandleMultiNodes ( nodes:Array ) :LzReplicationManager {
     //uhoh! this should be a clone
 
-    //Because we're about to start making siblings to this view,
-    //(i.e. out of lexical order)
-    //make sure that the replicated view has been added to the parent's
-    //subview list
-
-    //ok to call if already added
-
-    //FIXME: type? Function or Class?
-    var clonetype;
-    switch ( this.replication ){
-        case "lazy":
-            clonetype = LzLazyReplicationManager;
-            break;
-        case "resize":
-            clonetype = LzResizeReplicationManager;
-            break;
-        default:
-            clonetype = LzReplicationManager;
-            break;
+    var clonetype:Class;
+    if (this.replication == "lazy") {
+        clonetype = LzLazyReplicationManager;
+    } else if (this.replication == "resize") {
+        clonetype = LzResizeReplicationManager;
+    } else {
+        clonetype = LzReplicationManager;
     }
 
     //TODO: [20080327 anba] "storednodes" should be passed directly 
     // to the ReplicationManager, instead of doing this kludge 
+    //TODO: [20080626 anba] _instanceAttrs gets modified by LzReplicationManager, 
+    // should we make a copy?
     this.storednodes = nodes;
     var rman:LzReplicationManager = new clonetype( this, this._instanceAttrs);
     this.storednodes = null;
 
     return rman;
-
 }
 
 /**
@@ -329,10 +313,6 @@
   * @param Array nodes: A list of LzDataElements to replicate over.
   */
 function setNodes ( nodes:Array ) :void {
-    //Debug.write( "before context" ,this.context );
-    //this.setDataContext( nodes , false );
-    //Debug.write( "context" ,this.context );
-
     var rman:LzDatapath = this.__LZHandleMultiNodes( nodes );
 
     //__LZHandleMultiNodes will return the replication manager if "this" is a
@@ -387,13 +367,12 @@
 function __LZApplyData( force:Boolean = false) :void {
     var ip:LzNode = this.immediateparent;
 
-    if ( this.datacontrolsvisibility ){
-        ip.__LZvizDat = this.p != null; 
-          // [2008-03-12 pbr] Removed because swf9 doesn't like it. It can
-          // also be a LZMiniNode but it's a null def.
-          if (ip is LzView)
-//        if ('__LZupdateShown' in ip)
-            ip.__LZupdateShown();
+    if (this.datacontrolsvisibility) {
+        if (ip is LzView) {
+            var ipview = (ip cast LzView);
+            ipview.__LZvizDat = this.p != null;
+            ipview.__LZupdateShown();
+        }
     }
 
     var cdat:Boolean = force ||
@@ -538,7 +517,7 @@
 
     var ppdo:String = this.parsedPath ? this.parsedPath.operator : null;
     if (ppdo != null) {
-        var dat = (this.immediateparent cast LzNode).updateData();
+        var dat = this.immediateparent.updateData();
         if (dat !== void(0)) {
             if (ppdo == "nodeName") {
                 this.setNodeName( dat );
@@ -669,7 +648,7 @@
 
         if ( p && this.sel != p.sel ){
             this.sel = p.sel || false;
-            (this.immediateparent cast LzNode).setSelected( this.sel );
+            this.immediateparent.setSelected( this.sel );
         }
 
         this.__LZpchanged = true;
@@ -684,7 +663,7 @@
     this.p.sel = torf;
     this.sel = torf;
 
-    (this.immediateparent cast LzNode).setSelected( torf );
+    this.immediateparent.setSelected( torf );
 }
 
 /**

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as	2008-06-26 20:04:06 UTC (rev 10037)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as	2008-06-26 20:49:07 UTC (rev 10038)
@@ -707,16 +707,6 @@
     // set the bgcolor alpha if not set by the context menu and overridden by the context menu
     if (this.__LZbgRef && (this._bgcolorhidden != true && this._bgcolorshown != true))
          this.__LZbgRef._alpha = 100*v;
-
-    //@event onopacity: Sent when a view changes its opacity
-
-    var coviz = this.__LZvizO;
-    var newoviz = v != 0;
-    if ( coviz != newoviz ){
-        this.__LZvizO = newoviz;
-        this.__LZupdateShown();
-    }
-
 }
 
 /**

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs	2008-06-26 20:04:06 UTC (rev 10037)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs	2008-06-26 20:49:07 UTC (rev 10038)
@@ -77,11 +77,7 @@
   static var __LZdelayedSetters = new LzInheritedHash(LzNode.__LZdelayedSetters);
 /** @access private */
   static var earlySetters = new LzInheritedHash(LzNode.earlySetters);
-
-
-/** @access private
- * Just used to effect a type cast of immediateparent to LzView 
- */
+    
     /** @access private */
     var _height:Number;
     /** @access private */
@@ -803,6 +799,9 @@
 /** @access private */
 var __LZvizLoad= true;
 
+/** @access private */
+var __LZvizDat:Boolean = true;
+    
 /** 
   * The opacity of the view's contents. <literal>1.0</literal> is opaque; <literal>0.0</literal> is
   * totally transparent (invisible).
@@ -1437,7 +1436,7 @@
   * TODO: max : should be made private, api call from replication should be cleaner
   * @access private
   */
-override function __LZupdateShown( ) {
+function __LZupdateShown( ) {
     if ( this.visibility == "collapse" ){
         var shown = this.__LZvizO && this.__LZvizDat && this.__LZvizLoad;
     } else {



More information about the Laszlo-checkins mailing list