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

pbr@openlaszlo.org pbr at openlaszlo.org
Wed Apr 2 17:13:02 PDT 2008


Author: pbr
Date: 2008-04-02 17:12:53 -0700 (Wed, 02 Apr 2008)
New Revision: 8530

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/core/dummyclasses.js
   openlaszlo/trunk/WEB-INF/lps/lfc/data/Library.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataAttrBind.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataElement.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataNode.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataRequest.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataText.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapath.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapointer.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatasource.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzLazyReplicationManager.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzMiniNode.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzParam.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzParsedPath.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzReplicationManager.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzResizeReplicationManager.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs
Log:
Change 20080401-Philip-2 by Philip at Philip-DC on 2008-04-01 20:23:26 EDT
     in /cygdrive/f/laszlo/svn/src/svn/openlaszlo/trunk2
     for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Convert data classes to build in swf/dhtml/swf9

New Features:

Bugs Fixed:

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

Documentation:

Release Notes:

Details:
Converted lfc so data classes build in swf/dhtml/swf9. There is no new functionality in this release. The data classes build on swf9 but you will see a number of runtime errors until debugging is finished.

The dummydata classes are no longer needed.

Comments:

kernel/swf/LzLoader.lzs - LzDataText and LzDataElement objects are created that bypass initialization. I patched the file so it works, but this needs to be fixed (LPP-5690).

LzMiniNode - Figure out if more functionality is needed in this class (like setAttribute).

LzDataElement - Copied some debug routines for building swf9. These will be removed when the entire lfc is running in swf9.

LzReplicationManager, LzResizeReplicationManager - A few pieces of code are commented out from swf9 builds until I figure out the right thing to do.


Tests:
smoketest, and /lfc/data/alldata.lzx in swf/dhtml amazon, lzpix, calendar in swf/dhtml. I can't (currently) run 'ant lztest' in a native windows environment.

I found one regression but I see it in a clean sandbox as well. lzpix in swf shows the picture 'Tags' on top of each other.


Files:
M      WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs
M      WEB-INF/lps/lfc/core/LzNode.lzs
M      WEB-INF/lps/lfc/core/dummyclasses.js
M      WEB-INF/lps/lfc/data/LzMiniNode.lzs
M      WEB-INF/lps/lfc/data/LzReplicationManager.lzs
M      WEB-INF/lps/lfc/data/LzDatapointer.lzs
M      WEB-INF/lps/lfc/data/LzDataNode.lzs
M      WEB-INF/lps/lfc/data/LzDataRequest.lzs
M      WEB-INF/lps/lfc/data/LzResizeReplicationManager.lzs
M      WEB-INF/lps/lfc/data/LzParsedPath.lzs
M      WEB-INF/lps/lfc/data/LzLazyReplicationManager.lzs
M      WEB-INF/lps/lfc/data/LzDataText.lzs
M      WEB-INF/lps/lfc/data/LzDataElement.lzs
M      WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs
M      WEB-INF/lps/lfc/data/LzDataset.lzs
M      WEB-INF/lps/lfc/data/LzDatapath.lzs
M      WEB-INF/lps/lfc/data/LzDatasource.lzs
M      WEB-INF/lps/lfc/data/Library.lzs
M      WEB-INF/lps/lfc/data/LzParam.lzs
M      WEB-INF/lps/lfc/data/LzDataAttrBind.lzs

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20080401-Philip-2.tar



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs	2008-04-02 21:18:03 UTC (rev 8529)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs	2008-04-03 00:12:53 UTC (rev 8530)
@@ -931,7 +931,7 @@
           if ( oset[a] || args[a] === LzNode._ignoreAttribute ) continue;
           oset[ a ] = true;
 
-          if (val instanceof LzInitExpr) {
+          if (val is LzInitExpr) {
             if (val instanceof LzConstraintExpr) {
               if (constraints == null) { constraints = []; }
               constraints.push(val);
@@ -1690,11 +1690,12 @@
 
   /**
    * Sets the datacontext for the node to the data element given as an
-   * argument
+   * argument.
    * @access public
    * @param LzDataElement data: The dataelement to use as the context
+   * @param ignore: This parameter is only used in LzDataset
    */
-  function setData(data) {
+  function setData(data, ignore=null) {
     this.data = data;
     var dp = (this.datapath != null) ? this.datapath : new LzDatapath(this);
     dp.setPointer(data);

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/core/dummyclasses.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/core/dummyclasses.js	2008-04-02 21:18:03 UTC (rev 8529)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/core/dummyclasses.js	2008-04-03 00:12:53 UTC (rev 8530)
@@ -29,7 +29,7 @@
 */
 
 
-#include "core/dummydata.js"
+// #include "core/dummydata.js"
 
 
 public class LzCSSStyle {

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/Library.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/Library.lzs	2008-04-02 21:18:03 UTC (rev 8529)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/Library.lzs	2008-04-03 00:12:53 UTC (rev 8530)
@@ -7,31 +7,6 @@
   * @access private
   */
 
-if ($swf9) {
-    /*
-      #include "data/LzDataNode.js"
-#include "data/LzMiniNode.js"
-#include "data/LzDataElement.js"
-#include "data/LzDataText.js"
-
-#include "data/LzDataRequest.js"
-#include "data/LzDataProvider.js"
-#include "data/LzHTTPDataProvider.js"
-
-#include "data/LzDataset.js"
-#include "data/LzDatapointer.js"
-#include "data/LzParam.js"
-#include "data/LzParsedPath.js"
-#include "data/LzDatapath.js"
-#include "data/LzReplicationManager.js"
-#include "data/LzDatasource.js"
-#include "data/LzHTTPDatasource.js"
-#include "data/LzDataAttrBind.js"
-
-#include "data/LzLazyReplicationManager.js"
-#include "data/LzResizeReplicationManager.js"
-    */
-} else {
 #include "data/LzDataNode.lzs"
 #include "data/LzMiniNode.lzs"
 #include "data/LzDataElement.lzs"
@@ -55,8 +30,8 @@
 
 #include "data/LzLazyReplicationManager.lzs"
 #include "data/LzResizeReplicationManager.lzs"
-}
 
+
 if ($as2) {
     #include "data/platform/swf/LzConnection.lzs"
     #include "data/platform/swf/LzConnectionDatasource.lzs"

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataAttrBind.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataAttrBind.lzs	2008-04-02 21:18:03 UTC (rev 8529)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataAttrBind.lzs	2008-04-03 00:12:53 UTC (rev 8530)
@@ -12,11 +12,13 @@
 class LzDataAttrBind extends LzDatapointer {
 
 function LzDataAttrBind ( ndpath , attr, path ){
+                            super (ndpath, attr)
                             this.setAttr = attr;
                             this.pathparent = ndpath;
                             this.node = ndpath.immediateparent;
                             this.setXPath( path );
 
+                            this.rerunxpath = true; // From LzDatapointer
                             if ( ndpath.__LZdepChildren == null ){
                                 ndpath.__LZdepChildren = [ this ];
                             } else {
@@ -25,10 +27,13 @@
 }
 
 
-prototype.rerunxpath = true; // Override value defined in LzDatapointer
+// prototype.rerunxpath = true; // Override value defined in LzDatapointer
 var $pathbinding = true;
+var setAttr;
+var pathparent;
+var node;
 
-function __LZsendUpdate ( a , b ){ 
+override function __LZsendUpdate ( a = null , b = null ){ 
     var pchg = this.__LZpchanged;
     if ( ! super.__LZsendUpdate.apply(this, arguments) ) return;
     if ( pchg ||
@@ -63,8 +68,8 @@
 }
 
 
-function setDataContext ( dc ){
-    super.setDataContext( dc || this.pathparent );
+override function setDataContext ( dc, implicit = null ){
+    super.setDataContext( dc || this.pathparent, implicit );
 }
 
 
@@ -88,7 +93,7 @@
     }
 }
 
-function toString ( ){ 
+override function toString ( ){ 
     return 'binder ' + this.xpath;
 }
 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataElement.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataElement.lzs	2008-04-02 21:18:03 UTC (rev 8529)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataElement.lzs	2008-04-03 00:12:53 UTC (rev 8530)
@@ -41,15 +41,25 @@
 var onnodeName = LzDeclaredEvent;
 
 /** @access private */
-var __LZo = -1;
+//var __LZo = -1;
 /** @access private */
-var __LZcoDirty = true;
+//var __LZcoDirty = true;
 /** @access private */
 var __LZchangeQ = null;
 /** @access private */
 var __LZlocker = null;
 
+/** The name of this node.
+  * @type String
+  */
+var nodeName:* = null;
 
+/** The dictionary of attributes for this node.
+  * @type Object
+  */
+var attributes:* = null;
+
+
 /** Inserts the given LzDataNode before another node in this node's childNodes
   * @param LzDataNode newChild: the LzDataNode to insert
   * @param LzDataNode refChild: the LzDataNode to insert newChild before
@@ -338,7 +348,8 @@
 /**
   * @access private
   */
-function __LZgetText ( ){
+// dummyarg needed for calls from LzDatapointer.__LZprocessOperator
+function __LZgetText ( dummyarg = null ){
     var s= "";
     for ( var i = 0; i < this.childNodes.length; i++ ){
         var c = this.childNodes[ i ]
@@ -446,7 +457,8 @@
     } else {
         s += "/" + this.__LZgt;
     }
-    if (s.length > len) { s = Debug.abbreviate(s, len); }
+//PBR DEBUG Make Debug when it's ported
+    if (s.length > len) { s = LzDataElement.abbreviate(s, len); }
     return s;
 }
 
@@ -454,8 +466,9 @@
   * For debugging.  Same as serialize, but will abbreviate at printLength.
   * @access private
   */
-function _dbg_name () {
-    return this.serializeInternal(Debug.printLength);
+override function _dbg_name () {
+//PBR DEBUG Make Debug when it's ported
+    return this.serializeInternal(LzDataElement.printLength);
 }
 
 /**
@@ -466,7 +479,7 @@
   * @param LzDataNode who: The node that changed.
   * @param Number type: private
   */
-function handleDocumentChange ( what , who , type, cobj ){
+function handleDocumentChange ( what , who , type, cobj=null ){
     var o = { who:  who , what: what , type : type};
     if (cobj) o.cobj = cobj;
     if ( this.__LZchangeQ ){
@@ -479,7 +492,7 @@
 /**
   * @access private
   */
-function toString (){
+override function toString (){
     //this.__LZlt = "&lt;";
     //this.__LZgt = "&gt;";
     var r = this.serialize();
@@ -530,15 +543,70 @@
             }
         }
     }
-    
+  
 
 }
 
+} // End of LzDataElementMixin
+
+
 /**
+  * <p>
+  * An LzDataElement represents a node a in a hierarchical dataset. An LzDataElement can contain other LzDataElements, or <classname>LzDataText</classname>, which represents a text node. See the example on <classname>LzDataNode</classname>. 
+  * </p>
+  *
+  * @shortdesc A node of hierarchical data.
+  * @see LzDataNode LzDataText LzDataPointer
+  * @access public
+  */
+class LzDataElement extends LzMiniNode with LzDataElementMixin, LzDataNodeMixin
+{
+    // N.B.: LzDataElement is not an LzNode so has a different
+    // initialize signature.
+    function LzDataElement ( name , attributes = null, children = null) {
+            super(name, attributes, children);
+            this.nodeName = name;
+            this.nodeType = LzDataNode.ELEMENT_NODE;
+            this.attributes = attributes;
+            this.ownerDocument = this;
+            if (children == null) {
+                this.setChildNodes ( [] );
+            } else {
+                this.setChildNodes( children );
+            }
+        }
+
+/**
+  * Returns a list of empty nodes, each named 'name'.
+  * @param Number count: how many nodes to create.
+  * @param String name: the name for each node
+  * @return Array: list of new nodes.
+  */
+static function makeNodeList(count, name) {
+    var a = [];
+    for (var i=0; i < count; i++) {
+        a[i] = new LzDataElement(name, {}, null);
+    }
+    return a;
+}
+
+//TODO Used instead of Debug.abbreviate. You can remove this when Debug is
+// moved to swf9
+static var printLength = 1024;
+static function abbreviate (s, l) {
+  var ellipsis = '...'; // '\u2026' doesn't work, wah.
+  if (s.length > (l - ellipsis.length)) {
+    s = s.substring(0, l - ellipsis.length) + ellipsis;
+  }
+  return s;
+}
+
+
+/**
   * Get LzDataElement representation of primitive type, array, or object value.
   */
 static function valueToElement ( o ) {
-    var n = new LzDataElement("element", { }, LzDataElementTrait.__LZv2E(o));
+    var n = new LzDataElement("element", { }, LzDataElement.__LZv2E(o));
     return n; 
 }
 
@@ -566,7 +634,7 @@
             type = "array";
             var tag = (o.__LZtag != null ? o.__LZtag : 'item');
             for (var i=0; i < o.length; i++) {
-                var tmpC = this.__LZv2E( o[i] );
+                var tmpC = LzDataElement.__LZv2E( o[i] );
                 c[i] = new LzDataElement(tag, null, tmpC ); 
             }
         } else {
@@ -575,7 +643,7 @@
             for (var k in o) {
                 // skip any properties that start with __LZ
                 if (k.indexOf('__LZ') == 0) continue;
-                c[i++] = new LzDataElement(k, null, this.__LZv2E(o[k]));
+                c[i++] = new LzDataElement(k, null, LzDataElement.__LZv2E(o[k]));
             }
         }
     } else if (o != null) {
@@ -587,79 +655,4 @@
     return c;
 }
 
-} // End LzDataElementTrait
-
-/**
-  * Just enough of LzNode to make setters work for DataElements
-  * @access public
-  * @topic LZX
-  * @subtopic Runtime
-  * @todo [2006-08-23 ptw] Fix this modularity.  Is it really too
-  * expensive to have this above LzNode?
-  * @devnote this is public because public classes inherit from it. Put it
-  * in LZX.Runtime to semi-sorta obscure it.
-  */
-class LzMiniNode {
-  var setAttribute = LzNode.prototype.setAttribute;
-}
-
-/**
-  * <p>
-  * An LzDataElement represents a node a in a hierarchical dataset. An LzDataElement can contain other LzDataElements, or <classname>LzDataText</classname>, which represents a text node. See the example on <classname>LzDataNode</classname>. 
-  * </p>
-  *
-  * @shortdesc A node of hierarchical data.
-  * @see LzDataNode LzDataText LzDataPointer
-  * @access public
-  */
-class LzDataElement extends LzMiniNode with LzDataElementMixin, LzDataNodeMixin
-{
-    // N.B.: LzDataElement is not an LzNode so has a different
-    // initialize signature.
-    function LzDataElement ( name , attributes , children ) {
-            super(name, attributes, children);
-            this.nodeName = name;
-            this.attributes = attributes;
-            this.ownerDocument = this;
-            if (children == null) {
-                this.setChildNodes ( [] );
-            } else {
-                this.setChildNodes( children );
-            }
-        }
-/** The name of this node.
-  * @type String
-  */
-var nodeName        = null;
-//var nodeValue       = null;
-var nodeType = LzDataNode.ELEMENT_NODE
-;
-/** An array of children of this node
-  * @type LzDataNode
-  */
-var childNodes      = null;
-
-/** The dictionary of attributes for this node.
-  * @type Object
-  */
-var attributes      = null;
-
-/**
-  * Returns a list of empty nodes, each named 'name'.
-  * @param Number count: how many nodes to create.
-  * @param String name: the name for each node
-  * @return Array: list of new nodes.
-  */
-static function makeNodeList(count, name) {
-    var a = [];
-    for (var i=0; i < count; i++) {
-        a[i] = new LzDataElement(name, {}, null);
-    }
-    return a;
-}
-
-static function valueToElement ( o ) {
-  return LzNode_DataNode_DOM.prototype.valueToElement(o);
-}
-
 } // End of LzDataElement

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataNode.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataNode.lzs	2008-04-02 21:18:03 UTC (rev 8529)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataNode.lzs	2008-04-03 00:12:53 UTC (rev 8530)
@@ -77,8 +77,21 @@
   * @type Number
   * @keywords abstract
   */
-var nodeType; // This is undefined. Set elsewhere
+var nodeType:*; // This is undefined. Set elsewhere
 
+var parentNode:* = null;
+var ownerDocument:*;
+var __LZo:* = -1;
+
+/** An array of children of this node
+  * @type LzDataNode
+  */
+var childNodes:* = null;
+
+/** @access private */
+var __LZcoDirty = true;
+
+
 /**
   * Returns the sibling before this one this node's parentNodes List of children
   * @return LzDataNode: The node preceeding this one in this node's childNodes
@@ -137,7 +150,8 @@
   * @param Boolean allowself: If true, this function returns true if the given
   * node is the same as this node.
   */
-function childOf ( el , allowself ) {
+// Renamed from childOf to avoid conflict with LzNode.childOf
+function childOfNode ( el , allowself ) {
     var p = allowself ? this : this.parentNode
     while ( p ){
         if ( p == el ) return true;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataRequest.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataRequest.lzs	2008-04-02 21:18:03 UTC (rev 8529)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataRequest.lzs	2008-04-03 00:12:53 UTC (rev 8530)
@@ -49,6 +49,7 @@
 
     /** An optional property that's the object using the DataRequest to pass into the dataprovider's doRequest method.
     * @type Object
+    */
     var requestor = null; 
     /** An object which holds the protocol-specific source to load data from
     * @type Object
@@ -81,7 +82,7 @@
     * The object using the DataRequest to pass into the dataprovider's doRequest method.
     * @param Object requestor: The object using the DataRequest to pass into the dataprovider's doRequest method.
     */
-    function LzDataRequest (requestor) { 
+    function LzDataRequest (requestor = null) { 
         super(requestor);
         this.requestor = requestor; 
     } 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataText.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataText.lzs	2008-04-02 21:18:03 UTC (rev 8529)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataText.lzs	2008-04-03 00:12:53 UTC (rev 8530)
@@ -23,6 +23,7 @@
   */
 function LzDataText ( text ){
     super();
+    this.nodeType = LzDataNode.TEXT_NODE;
     this.data = text;
 }
 
@@ -39,9 +40,12 @@
 /** @lzxtype event */
 var onnodeName = LzDeclaredEvent;
 
+/** @lzxtype event */
+var ondata = LzDeclaredEvent;
+
 /** This property is of type String, can raise a DOMException object on setting
   * and can raise a DOMException object on retrieval. */
-var nodeType = LzDataNode.TEXT_NODE;
+//var nodeType = LzDataNode.TEXT_NODE;
 
 /** The name of this node.
  * According to W3C-specs, nodeName for LzDataText should return
@@ -93,7 +97,7 @@
 /**
   * @access private
   */
-function toString (){
+override function toString (){
     //return this.serialize();
     return this.data;
 }

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapath.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapath.lzs	2008-04-02 21:18:03 UTC (rev 8529)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapath.lzs	2008-04-03 00:12:53 UTC (rev 8530)
@@ -80,7 +80,7 @@
   * of <classname>datapointer</classname>, and true for instances of
   * <classname>datapath</classname>.
   */
-prototype.rerunxpath = true; // Defined in LzDatapointer
+// prototype.rerunxpath = true; // Defined in LzDatapointer
 
 /** This attribute is deprecated, and should not be used. Developers should use
   * a view's <attribute>visible</attribute> property to control visibility.
@@ -91,6 +91,10 @@
 
 /** @access private */
 var __LZtakeDPSlot = true;
+var storednodes;
+var __LZneedsUpdateAfterInit;
+var __LZdepChildren;
+var sel;
 
 
 /** Sent when the datapath's data changes.
@@ -146,7 +150,13 @@
 /**
   * @access private
   */
-function construct ( v , args ){
+function LzDatapath ( v , args:* = null, children:* = null, instcall:* = null ){
+    super(v, args, children, instcall);
+}
+
+override function construct ( v , args ){
+    this.rerunxpath = true; // Defined in LzDatapointer
+
     super.construct.apply(this, arguments);
 
     // construct this to prevent undefined property error
@@ -162,11 +172,12 @@
         this.immediateparent.datapath = this;
         var pdp = null;
         var tarr = null;
-        if ('searchParents' in this.immediateparent) {
+// [2008-03-12 pbr] Removed the 'in' test. not needed
+//        if ('searchParents' in this.immediateparent) {
             pdp = this.immediateparent.searchParents( "datapath" ).datapath;
 
             tarr = pdp.__LZdepChildren;
-        }
+//        }
 
         //set it early, so that it's right when xpath first runs
         if ( tarr != null ){
@@ -175,7 +186,9 @@
             for ( var i =  tarr.length - 1 ; i >= 0 ; i-- ){
                 var c = tarr[ i ];
                 if ( c != this &&
-                    !c.$pathbinding &&
+                      !(c is LzDataAttrBind) &&
+// [2008-03-12 pbr] Changed check because swf9 doesn't like it
+//                    !c.$pathbinding &&
                     c.immediateparent != this.immediateparent &&
                     c.immediateparent.childOf( this.immediateparent )){
                     c.setDataContext( this ,true );
@@ -192,7 +205,7 @@
 /**
   * @access private
   */
-function __LZHandleMultiNodes ( nodes ){
+override function __LZHandleMultiNodes ( nodes ){
     //uhoh! this should be a clone
 
     //Because we're about to start making siblings to this view,
@@ -217,7 +230,7 @@
 
     this.storednodes = nodes;
     var rman = new clonetype( this, this._instanceAttrs);
-    delete this.storednodes;
+    this.storednodes = null;
 
     return rman;
 
@@ -261,7 +274,7 @@
 /**
   * @access private
   */
-function __LZsendUpdate( upd , upp ) {
+override function __LZsendUpdate( upd = null, upp = null ) {
     var pchg = this.__LZpchanged;
     if ( !super.__LZsendUpdate.apply(this, arguments) ){
         return false;
@@ -283,20 +296,23 @@
 function __LZApplyDataOnInit( ) {
     if ( this.__LZneedsUpdateAfterInit ){
         this.__LZApplyData();
-        delete this.__LZneedsUpdateAfterInit;
+        this.__LZneedsUpdateAfterInit = null;
     }
 }
 
 /**
   * @access private
   */
-function __LZApplyData( force ) {
+function __LZApplyData( force = null) {
 
     var ip = this.immediateparent;
 
     if ( this.datacontrolsvisibility ){
         this.immediateparent.__LZvizDat = this.p != null; 
-        if ('__LZupdateShown' in this.immediateparent)
+          // [2008-03-12 pbr] Removed because swf9 doesn't like it. It can
+          // also be a LZMiniNode but it's a null def.
+          if (this.immediateparent is LzView)
+//        if ('__LZupdateShown' in this.immediateparent)
             this.immediateparent.__LZupdateShown();
     }
 
@@ -322,8 +338,8 @@
 /**
   * @access private
   */
-function setDataContext ( p , implicit ){
-    if ( p == null && this.immediateparent != null && 'searchParents' in this.immediateparent){
+override function setDataContext ( p , implicit = null ){
+    if (p == null && this.immediateparent != null) {
         p = this.immediateparent.searchParents( "datapath" ).datapath;
         implicit = true;
     }
@@ -360,12 +376,16 @@
   * Removes the datapath from its parent
   * @access private
   */
-function destroy( recur ){
+override function destroy(){
+if ($swf9) {}
+else {
     this.$lzc$set_name = null; //so this can't be assigned
+}
     this.__LZupdateLocked = true; //so won't set data
 
     if ( this.context && !this.context.__LZdeleted && 
-         this.context.__LZdepChildren ){
+         this.context is LzDatapath ){
+//         this.context.__LZdepChildren ){
         //remove self from __LZdepChildren
         var dca = this.context.__LZdepChildren;
 
@@ -397,7 +417,7 @@
     }
 
     if ( this.immediateparent.datapath == this ){
-        delete this.immediateparent.datapath;
+        this.immediateparent.datapath = null;
     }
 
     super.destroy.apply(this, arguments);
@@ -429,8 +449,8 @@
     }
 
     var ppdo = this.parsedPath ? this.parsedPath.operator : null;
-    if ( this.immediateparent.updateData && ppdo != null){
-        var dat = this.immediateparent.updateData();
+    if ( this.immediateparent is LzDatapath && ppdo != null){
+        var dat = LzDatapath(this.immediateparent).updateData();
         if ( ppdo =="nodeName" ){
             this.setNodeName( dat );
         } else  if ( ppdo =="__LZgetText" ){
@@ -469,7 +489,7 @@
 /**
   * @access private
   */
-function __LZHandleDocChange ( who ){
+override function __LZHandleDocChange ( who ){
     if ( super.__LZHandleDocChange.apply(this, arguments) ){
         if (this.immediateparent.ondata.ready) this.immediateparent.ondata.sendEvent( this.data );
         if (this.onDocumentChange.ready) this.onDocumentChange.sendEvent( who );
@@ -480,7 +500,7 @@
 /**
   * @access private
   */
-function toString( ){
+override function toString( ){
     return "Datapath for " + this.immediateparent;
 }
 
@@ -496,9 +516,9 @@
 /**
   * @access private
   */
-function __LZcheckChange ( chgpkg ){
+override function __LZcheckChange ( chgpkg ){
     if ( !super.__LZcheckChange.apply(this, arguments) ){
-        if ( chgpkg.who.childOf( this.p , true ) && this.onDocumentChange.ready){
+        if ( chgpkg.who.childOfNode( this.p , true ) && this.onDocumentChange.ready){
             this.onDocumentChange.sendEvent( chgpkg );
         }
     }
@@ -516,7 +536,7 @@
   *
   * @access private
   */
-function __LZsetTracking ( who, additive, needscheck ) {
+override function __LZsetTracking ( who, additive = null, needscheck = null ) {
 #pragma 'warnUndefinedReferences=true'
     var tracking;
     var trackDel;
@@ -581,7 +601,9 @@
 
         if ( p && this.sel != p.sel ){
             this.sel = p.sel || false;
-            this.immediateparent.setSelected( this.sel );
+            if ( this.immediateparent is LzDatapath){
+                LzDatapath(this.immediateparent).setSelected( this.sel );
+            }
         }
 
         this.__LZpchanged = true;
@@ -632,13 +654,16 @@
 function setSelected( torf ){
     this.p.sel =  torf;
     this.sel = torf;
-    this.immediateparent.setSelected( torf );
+
+    if ( this.immediateparent is LzDatapath){
+        LzDatapath(this.immediateparent).setSelected( torf );
+    }
 }
 
 /**
   * @access private
   */
-function __LZgetLast( ){
+override function __LZgetLast( ){
     if ( this.__LZisclone ) return this.context.nodes.length;
 
     else if ( this.p == this.context.getContext() &&
@@ -652,7 +677,7 @@
 /**
   * @access private
   */
-function __LZgetPosition( ){
+override function __LZgetPosition( ){
     if ( this.__LZisclone ) return this.immediateparent.clonenumber + 1;
 
     else if ( this.p == this.context.getContext() &&

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapointer.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapointer.lzs	2008-04-02 21:18:03 UTC (rev 8529)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapointer.lzs	2008-04-03 00:12:53 UTC (rev 8530)
@@ -85,7 +85,11 @@
 /** @access private */
   static var attributes  = {ignoreplacement: true};
 
+  // swf9 issues a runtime error without this
   /** @access private */
+  function $lzc$set_ignoreplacement (v) {this.ignoreplacement = v;}
+
+  /** @access private */
   function $lzc$set_xpath (v) { this.setXPath(v); }
   /** @access private */
   function $lzc$set_context (v) { this.setDataContext(v); }
@@ -101,7 +105,7 @@
   * @type LzDataNode
   */
 var p = null;
-var data = null;
+// var data = null;
 
 /** The reference to a clonemanager from a clone.
     @modifiers readonly */ 
@@ -112,7 +116,18 @@
 /** @access private */
 var __LZtrackDel = null;
 
+var xpath = null;
+var parsedPath = null;
+var __LZlastdotdot = null;
+var __LZspecialDotDot = false;
+var __LZspecialOndata = false;
+var __LZdotdotCheckDel;
+var __LZoldDataDel;
+var __LZoldOndataWarn;
+var errorDel;
+var timeoutDel;
 
+
 /** This determines the behavior of the
   * datapointer in response to notification that the dataset the
   * datapointer is mapped to has changed. If
@@ -142,7 +157,7 @@
   * its attributes.
   * @lzxtype event
   */
-var ondata = LzDeclaredEvent;
+// var ondata = LzDeclaredEvent;
 /** Sent when the dataset that the datapointer 
   * is pointing to generates an error.
   * @lzxtype event
@@ -156,6 +171,9 @@
 /** @lzxtype event */
 var onrerunxpath = LzDeclaredEvent;
 
+    function LzDatapointer ( parent:* = null , attrs:* = null, children:* = null, instcall:*  = null) {
+      super (parent, attrs, children, instcall);
+    }
 
 //to set datapointer to datasource:dataset
 //<datapointer xpath="foo:bar/">
@@ -266,7 +284,7 @@
         this.didGetXPathWarn = true;
     }
     var r = this.xpathQuery( p );
-    var nr
+    var nr;
     //testing for nodeType is the best way I can think of to check if the
     //return value is a node
 
@@ -286,8 +304,9 @@
 
 }
 /** @access private */
-var $lzc$getXPath_dependencies;
-$lzc$getXPath_dependencies = $lzc$xpathQuery_dependencies;
+function $lzc$getXPath_dependencies ( who , self , p ){
+    $lzc$xpathQuery_dependencies (who, self, p);
+}
 
 
 /**
@@ -371,7 +390,7 @@
             !this.rerunxpath ){
             this.__LZspecialOndata = true;
         } else if ( this.__LZspecialOndata ){
-            delete this.__LZspecialOndata;
+            this.__LZspecialOndata = null;;
         }
     }
 
@@ -387,7 +406,9 @@
     }
 
     var newc = null;
-    if ( this.context && 'getContext' in this.context ){
+// [2008-03-12 pbr] Can't use 'in' in swf9
+//    if ( this.context && 'getContext' in this.context ){
+    if ( this.context && (this.context is LzDatapointer || this.context is LzDataset)) {
         newc = this.context.getContext();
     }
 
@@ -401,7 +422,9 @@
         //no node found
         this.__LZHandleNoNodes();
         return false;
-    }else if ( n.length ) {
+// [2008-03-12 pbr] Use 'is' to see if it's an array, not n.length
+//    }else if ( n.length ) {
+    }else if ( n is Array ) {
         this.__LZHandleMultiNodes( n );
         return false;
     } else {
@@ -528,7 +551,7 @@
 var __LZdchanged = false;
 
 /** @access private */
-function __LZsendUpdate ( upd , upp ){ 
+function __LZsendUpdate ( upd = null, upp = null ){ 
 
     this.__LZdchanged = upd || this.__LZdchanged;
     this.__LZpchanged = upp || this.__LZpchanged;
@@ -630,8 +653,7 @@
 
 
 /** @access private */
-function __LZgetNodes ( pathobj , p , startpoint ){
-
+function __LZgetNodes ( pathobj , p , startpoint = null ){
   var np;
 
   if ( p == null ){
@@ -662,7 +684,8 @@
 
       np = null;
 
-      if ( null != cp.pred ){
+// [2008-04-01 pbr] Make sure cp is an Object (ie. hash)
+      if ( cp is Object && 'pred' in cp && null != cp.pred ){
         if ( cp.pred == "hasattr" ){
           p = p.hasAttr( cp.attr ) ? p : false;
         } else if ( cp.pred == "attrval" ){
@@ -748,7 +771,7 @@
   * one datapointer to function as the datacontext for another
   * @access private
   */
-function getContext ( ){
+function getContext ( chgpkg = null ){
     return this.p;
 }
 
@@ -830,7 +853,7 @@
   * <param>amnt</param> is <code>1</code>.
   * @return Boolean: True if the pointer was able to move forward <param>amnt</param> nodes.
   */
-function selectNext ( amnt ) {
+function selectNext ( amnt = null ) {
   return this.__LZdoSelect('getNextSibling', amnt);
 }
 
@@ -864,7 +887,7 @@
   * @return Boolean: A Boolean indicating if the pointer was able to move up
   * <param>amnt</param> nodes.
   */
-function selectParent ( amnt ){
+function selectParent ( amnt = null ){
   return this.__LZdoSelect('getParent', amnt);
 }
 
@@ -1136,7 +1159,7 @@
   * has a following sibling, the pointer is repositioned at that sibling.
   * Otherwise the pointer is set to <code>null</code>.
   */
-function deleteNode ( ){
+override function deleteNode( recursiveCall = null){
     if ( ! this.p ) {
         if ( $debug ) {
             Debug.info("%s: p is null in %s", arguments.callee, this);
@@ -1219,7 +1242,7 @@
 
 
 /** @access private */
-function __LZprocessOperator ( p , pp , depends ){
+function __LZprocessOperator ( p , pp , depends = null ){
     if (p == null) {
         if ( $debug ) {
             Debug.info("%s: p is null in %s", arguments.callee, this);
@@ -1243,9 +1266,12 @@
     }
 
     var val = p;
+    // TODO: [2008-3-12 pbr] Verify this works for all cases
+    //  I found that val can be an LzDataElement or a hash (from LzDataElement)
     for (var i = 0; i < parts.length; i++) {
         var pathElt = parts[i];
-        if (val == null || !(pathElt in val)) {
+//        if (val == null || !(pathElt in val)) {
+        if (val == null || (!(val is LzDataElement) && !(pathElt in val))) {
             // TODO: [2007-3-16 hqm] I'll do what Ben did, return undefined
             return;
         } else {
@@ -1329,7 +1355,8 @@
 
 
 /** @access private */
-function setDataContext ( dc ){
+// The optional argument is used by LzDatapath
+function setDataContext ( dc, ignore = null ){
     if ( dc == null ){
         this.context = this;
         if (this.p) {
@@ -1390,7 +1417,7 @@
              && 
              ( this.parsedPath && this.parsedPath.hasDotDot  ||
                 this.p == null            || 
-                this.p.childOf(chgpkg.who)   ) )
+                this.p.childOfNode(chgpkg.who)   ) )
             ){
             this.runXPath();
             return true;
@@ -1402,7 +1429,7 @@
 }
 
 /** @access private */
-function __LZneedsOpUpdate ( chgpkg ){
+function __LZneedsOpUpdate ( chgpkg = null ){
 
     //case 1 -- normal operator and node changed
     //case 2 -- this node is mapped to text()
@@ -1458,7 +1485,7 @@
     if (   ( chgpkg.type == 0          || 
            ( chgpkg.type == 1  && this.parsedPath.hasOpSelector ) ) 
           && 
-           ( this.context.getContext().childOf( who ) )
+           ( this.context.getContext().childOfNode( who ) )
         ){
         this.runXPath();
 
@@ -1466,7 +1493,7 @@
 }
 
 /** @access private */
-function destroy ( recur ){
+override function destroy () {
     this.__LZsetTracking( null );
     if ( this.errorDel ) this.errorDel.unregisterAll();
     if ( this.timeoutDel ) this.timeoutDel.unregisterAll();
@@ -1476,11 +1503,11 @@
     if ( this.__LZdotdotCheckDel ) {
         this.__LZdotdotCheckDel.unregisterAll();
     }
-    delete this.p;
-    delete this.data;
-    delete this.__LZlastdotdot;
-    delete this.context;
-    delete this.__LZtracking;
+    this.p = null;
+    this.data = null;
+    this.__LZlastdotdot = null;
+    this.context = null;
+    this.__LZtracking = null;
 
     super.destroy.apply(this, arguments);
 }
@@ -1496,7 +1523,7 @@
   * 
   * @access private
   */
-function __LZsetTracking ( who, force ){
+function __LZsetTracking ( who, force = null, needscheck = null ){
 #pragma 'warnUndefinedReferences=true'
     var tracking = this.__LZtracking;
     var trackDel = this.__LZtrackDel;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs	2008-04-02 21:18:03 UTC (rev 8529)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs	2008-04-03 00:12:53 UTC (rev 8530)
@@ -100,14 +100,19 @@
 /** @access private */
   static var attributes = new LzInheritedHash(LzNode.attributes);
  
+static var slashPat = "/";
+
 var dataprovider = defaultdataprovider;
 var multirequest = false;
 var dataRequest = null; 
 var dataRequestClass = LzHTTPDataRequest;
 var dsloadDel = null;
+var errorstring;
+var reqOnInitDel;
+var secureport;
 
 /** @lzxtype event */
-var ondata = LzDeclaredEvent;
+// var ondata = LzDeclaredEvent;
 /** Sent when the dataset's request results in an error. 
  * @lzxtype event
  */
@@ -121,7 +126,7 @@
 
 var postbody = null;
 
-var src = null;
+// var src = null;
 
 /** When true, the server will accept
   * encoded responses for this request.  
@@ -152,6 +157,10 @@
 var getresponseheaders = false;
 
 
+    function LzDataset ( parent:* = null, args:* = null, children:* = null, instcall:*  = null) {
+        super(parent,args,children,instcall);
+    }
+
 /**  HTTP method */
 
 var querytype = "GET";
@@ -164,7 +173,7 @@
   */
 var trimwhitespace = false;
 
-var nodeType = LzDataNode.DOCUMENT_NODE;
+// var nodeType = LzDataNode.DOCUMENT_NODE;
 
 /** When true, the server will attempt to cache 
   * response (defaults to false).  There are security concerns 
@@ -212,13 +221,17 @@
 var headers = null;
 var proxied = null;
 var responseheaders = null;
+var queuerequests = false;
+var oncanvas;
 
+
 /** @access private */
 function $lzc$set_initialdata(v) { this.setInitialData(v); }
 
 /** @access private */
 
-function construct ( parent , args ){
+override function construct ( parent , args ){
+    this.nodeType = LzDataNode.DOCUMENT_NODE;
     this.queuerequests = false; // default to false, to emulate browser default
 
     this.oncanvas = parent == canvas || parent == null;
@@ -249,7 +262,7 @@
   * Sets the name of this datasource - used only by initializer
   * @access private
   */
-function $lzc$set_name(name) {
+override function $lzc$set_name(name) {
     super.$lzc$set_name.apply(this, arguments);
 
     //for compatibility with dataNode API
@@ -290,7 +303,7 @@
   * destroy your datasource node if you made one for yourself.
   * @access private
   */
-function destroy ( recursiveCall ) {
+override function destroy () {
     this.setChildNodes([ ]);
     this.dataRequest = null;
 
@@ -369,7 +382,7 @@
   * @param headers optional HTTP response headers
   * @access private
   */
-function setData( data , headers ) {
+override function setData( data , headers = null ) {
     if ( data == null ) return;
     if (data instanceof Array) {
         this.setChildNodes( data );
@@ -410,7 +423,7 @@
   * This is the shared interface with datapointer
   * @access private
   */
-function getContext (){
+function getContext ( chgpkg = null){
     return this;
 }
 
@@ -630,7 +643,7 @@
   * Does a request immediately using the current values.  If autorequest is true,
   * this method is called automatically when values change.
   */
-function doRequest() {
+function doRequest(ignore=null) {
 
     // We try to reuse the old datarequest object, unless
     // multirequest is true. If multirequest is true, we need
@@ -643,7 +656,7 @@
 
     dreq.src     = this.src;
     dreq.timeout = this.timeout;
-    dreq.status  = dreq.READY;
+    dreq.status  = LzDataRequest.READY;
     dreq.method = this.querytype;
 
     // If this.querystring is set, use it as the source of param
@@ -823,7 +836,8 @@
 function setInitialData ( d ){
     if (d != null) {
         var e = LzDataNode.stringToLzData(d, this.trimwhitespace, this.nsprefix);
-        this.setData(e.childNodes);
+        if (e != null)
+            this.setData(e.childNodes);
     }
 }
 
@@ -834,7 +848,7 @@
   * @access private
   * @return: String representation of this object
   */
-function toString () {
+override function toString () {
     return "LzDataset " + ":" + this.name;
 }
 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatasource.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatasource.lzs	2008-04-02 21:18:03 UTC (rev 8529)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatasource.lzs	2008-04-03 00:12:53 UTC (rev 8530)
@@ -1,6 +1,6 @@
 /**
   *
-  * @copyright Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.
+  * @copyright Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
   *
   * @access public
@@ -45,12 +45,20 @@
   */
 class LzDatasource extends LzNode {
 
+/** @access private */
+static var attributes = new LzInheritedHash(LzNode.attributes);
+
 /**
   * @lzxtype booleanLiteral | "inherit"
   * @lzxdefault inherit
   */
 var proxied = null;
+var src;
 
+    function LzDatasource ( parent:* = null , attrs:* = null, children:* = null, instcall:*  = null) {
+        super(parent,attrs,children,instcall);
+    }
+
 function loadSuccess (loader, data) { loader.dataset.gotRawData(data); }
 function loadError   (loader, data) { loader.dataset.gotError(data);   }
 function loadTimeout (loader, data) { loader.dataset.gotTimeout(data); } 
@@ -69,7 +77,7 @@
     // If there is no loader, or if the loader changed it's proxied
     // flag, make a new loader.
     if ( !tloader){
-        tloader = new LzHTTPLoader(this, proxied, dataset);
+        tloader = new LzHTTPLoader(this, proxied);
         dataset.setOption( 'dsloader' , tloader );
         tloader.setQueueing(dataset.queuerequests);
         tloader.loadSuccess = this.loadSuccess;
@@ -127,7 +135,7 @@
   * @access private
   * @return: String representation of this object
   */
-function toString() {
+override function toString() {
     return "LzDatasource '" + this.name + "'";
 }
 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs	2008-04-02 21:18:03 UTC (rev 8529)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs	2008-04-03 00:12:53 UTC (rev 8530)
@@ -84,7 +84,7 @@
     /**
      * @access private
      */
-    function doRequest ( dreq ) {
+    override function doRequest ( dreq ) {
         // dreq.src can be null if the dataset is loaded from initialdata
         if (!dreq.src)
             return;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzLazyReplicationManager.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzLazyReplicationManager.lzs	2008-04-02 21:18:03 UTC (rev 8529)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzLazyReplicationManager.lzs	2008-04-03 00:12:53 UTC (rev 8530)
@@ -1,6 +1,6 @@
 /**
   *
-  * @copyright Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.
+  * @copyright Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
   *
   * @access public
@@ -49,10 +49,15 @@
   */
 class LzLazyReplicationManager extends LzReplicationManager {
 
-prototype.pooling = true; // Defined in LzReplicationManager
+// prototype.pooling = true; // Defined in LzReplicationManager
 
 /** The axis for layout of replicated views */
-var axis = "y";
+var axis = "y"
+var sizeAxis;
+var cloneimmediateparent;
+var updateDel;
+var __LZoldnodelen;
+var cloneimmediateparnt;
 
 /** The spacing between replicated views */
 var spacing = 0;
@@ -61,8 +66,14 @@
 /**
   * @access private
   */
-function construct ( odp , args ){
+function LzLazyReplicationManager ( odp , args, children:* = null, instcall:* = null ){
+    super(odp, args, children, instcall);
+}
+
+override function construct ( odp , args ){
     //replication argument needs to control pooling
+    this.pooling = true; // Defined in LzReplicationManager
+
     if ( args.pooling != null ){
         args.pooling = true;
         if ( $debug ){
@@ -136,7 +147,7 @@
 /**
   * @access private
   */
-function __LZsetCloneAttrs (){
+override function __LZsetCloneAttrs (){
     var cloneopt = { ignorelayout : true };
     if ( this.cloneAttrs.options != null ){
         cloneopt = new LzInheritedHash(this.cloneAttrs.options);
@@ -147,7 +158,7 @@
 /**
   * @access private
   */
-function __LZHandleNoNodes( ) {
+override function __LZHandleNoNodes( ) {
     this.__LZHandleMultiNodes( [ ] );
 }
 
@@ -174,7 +185,7 @@
   * the immediate parent of the replicated views  
   * @access private
   */
-function __LZadjustVisibleClones (ln,nn){
+override function __LZadjustVisibleClones (ln,nn){
     var nodelen = null;
     if (this.nodes) {
         nodelen = this.nodes.length;
@@ -283,14 +294,14 @@
 /**
   * @access private
   */
-function toString (){
+override function toString (){
     return "Lazy clone manager in " + this.cloneimmediateparent;
 }
 
 /**
   * @access private
   */
-function getCloneForNode ( p , dontmake ){
+override function getCloneForNode ( p , dontmake = null ){
     var cl = super.getCloneForNode( p ) ||
              null;
     if ( !cl && !dontmake ){
@@ -312,7 +323,7 @@
   * @param Number n: The zero-based offset of the clone to retrieve
   * @return LzView: A pointer to the nth clone
   */
-function getCloneNumber ( n ){
+override function getCloneNumber ( n ){
     return this.getCloneForNode(this.nodes[n]);
 }
 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzMiniNode.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzMiniNode.lzs	2008-04-02 21:18:03 UTC (rev 8529)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzMiniNode.lzs	2008-04-03 00:12:53 UTC (rev 8530)
@@ -20,1470 +20,19 @@
 
 // Inlined contents of LzMiniNode class
 class LzMiniNode {
-  static function initialize (prototype) {
-    if (! prototype.hasOwnProperty('setters')) {
-      prototype['setters'] = new LzInheritedHash(prototype['setters']);
-    }
+
+  //PBR DEBUG Does this need to do anything?
+  function LzMiniNode ( parent:* = null, attrs:* = null, children:* = null, instcall:*  = null){
   }
 
+  var children:Array = [];
+  var __LZdeleted:Boolean = false;
+  var sel; // Also defined in LzDatapath
+
   var setAttribute = LzNode.prototype.setAttribute;
-}
 
+  function _dbg_name () {}
+  function toString () {}
 
-// *************************
-// *                       *
-// *  LzMiniNode_DataNode  *
-// *                       *
-// *************************
-
-// class LzMiniNode_DataNode = LzMiniNode + LzDataNode
-class LzMiniNode_DataNode extends LzMiniNode
-{
-// #include "data/LzDataNode.lzs"
-// Manual copy of LzDataNode.lzx
-/** @lzxtype event */
-var onownerDocument = LzDeclaredEvent;
-
-
-/** The type of this node -- ELEMENT_NODE or TEXT_NODE
-  * @type Number
-  * @keywords abstract
-  */
-var nodeType; // This is undefined. Set elsewhere
-
-/**
-  * Returns the sibling before this one this node's parentNodes List of children
-  * @return LzDataNode: The node preceeding this one in this node's childNodes
-  */
-function getPreviousSibling (){
-    if (!this.parentNode) return null;
-    if ( this.parentNode.__LZcoDirty ) this.parentNode.__LZupdateCO();
-    return this.parentNode.childNodes[ this.__LZo - 1 ];
+  function __LZupdateShown( ) {}
 }
-
-/**
- * Returns the parent of this node
- * @return LzDataNode: the parent of this node
- */
-function getParent () {
-  return this.parentNode;
-}
-
-/**
-  * gets offset of node in parent's childNodes array
-  * @return number
-  */
-function getOffset (){
-    if (!this.parentNode) return 0;
-    if (this.parentNode.__LZcoDirty) this.parentNode.__LZupdateCO();
-
-    return this.__LZo;
-}
-
-/** @access private */
-function $lzc$getPreviousSibling_dependencies( who, self ){
-    return [ this.parentNode , "childNodes" , this , "parentNode" ];
-}
-
-/**
-  * Returns the sibling after this one this node's parentNodes List of children
-  * @return LzDataNode: The node succeeding this one in this node's childNodes
-  */
-function getNextSibling (){
-    if (!this.parentNode) return null;
-    if ( this.parentNode.__LZcoDirty ) this.parentNode.__LZupdateCO();
-    return this.parentNode.childNodes[ this.__LZo + 1 ];
-}
-
-/** @access private */
-function $lzc$getNextSibling_dependencies( who, self ){
-    return [ this.parentNode , "childNodes" , this , "parentNode" ];
-}
-
-
-
-/**
-  * Tells whether the given node is above this one in the node hierarchy.
-  * @param LzDataElement el: The LzDataElement to test to see if it is above
-  * this one
-  * @param Boolean allowself: If true, this function returns true if the given
-  * node is the same as this node.
-  */
-function childOf ( el , allowself ) {
-    var p = allowself ? this : this.parentNode
-    while ( p ){
-        if ( p == el ) return true;
-        p = p.parentNode;
-    }
-    return false;
-}
-
-/**
-  * Sets the LzDataNode which is the ownerDocument for this node.
-  * @param LzDataNode ownerDoc: The LzDataNode to act as the ownerDocument for
-  * this node.
-  */
-function setOwnerDocument ( ownerDoc ){
-    this.ownerDocument = ownerDoc;
-    if (this.childNodes) {
-        for ( var i = 0; i < this.childNodes.length; i++ ){
-            this.childNodes[ i ] .setOwnerDocument( ownerDoc );
-        }
-    }
-
-    if (this.onownerDocument && this.onownerDocument.ready) {
-        this.onownerDocument.sendEvent( ownerDoc );
-    }
-}
-
-/**
-  * @access private
-  */
-function __LZlockFromUpdate ( locker ){
-    this.ownerDocument.__LZdoLock( locker );
-}
-
-/**
-  * @access private
-  */
-function __LZunlockFromUpdate ( locker ){
-    this.ownerDocument.__LZdoUnlock( locker );
-}
-
-
-//End of manual include
-}
-
-
-// *****************************
-// *                           *
-// *  LzMiniNode_DataNode_DOM  *
-// *                           *
-// *****************************
-
-// class LzMiniNode_DataNode_DOM = LzMiniNode + LzDataNode + LzDataDOM
-class LzMiniNode_DataNode_DOM extends LzMiniNode_DataNode
-{
-//    #include "data/LzDataDOM.lzs"
-// Manual copy of LzDataDOM.lzs
-    static function initialize (prototype) {
-//       Debug.debug('LzDataElementTraitInitialize')
-      // There will be no setters property in the trait prototype,
-      // (and you don't want one there! as it would shadow the one
-      // from LzNode) but it will be there after LzNode.initialize
-      // runs
-      if (prototype.hasOwnProperty('setters')) {
-        // since you can't assign directly to these slots...
-        // until LzNode.initialize has run
-        prototype.setters.attributes = "setAttrs";
-        prototype.setters.childNodes = "setChildNodes";
-        prototype.setters.nodeName = "setNodeName";
-        // Shouldn't be directly settable
-        prototype.setters.ownerDocument = "setOwnerDocument";
-      }
-    }
-
-/** @lzxtype event */
-var onDocumentChange = LzDeclaredEvent;
-/** @lzxtype event */
-var onparentNode = LzDeclaredEvent;
-/** @lzxtype event */
-var onchildNode = LzDeclaredEvent;
-/** @lzxtype event */
-var onchildNodes = LzDeclaredEvent;
-/** @lzxtype event */
-var onattributes = LzDeclaredEvent;
-/** @lzxtype event */
-var onnodeName = LzDeclaredEvent;
-
-/** @access private */
-var __LZo = -1;
-/** @access private */
-var __LZcoDirty = true;
-/** @access private */
-var __LZchangeQ = null;
-/** @access private */
-var __LZlocker = null;
-
-
-/** Inserts the given LzDataNode before another node in this node's childNodes
-  * @param LzDataNode newChild: the LzDataNode to insert
-  * @param LzDataNode refChild: the LzDataNode to insert newChild before
-  * @return LzDataElement: The new child, or null if the refChild wasn't found
-  */
-function insertBefore (newChild, refChild){
-    this.__LZcoDirty = true;
-
-    for ( var i = 0; i < this.childNodes.length; i++ ){
-        if ( this.childNodes[ i ] == refChild ){
-            this.childNodes.splice( i , 0 , newChild );
-            newChild.setOwnerDocument( this.ownerDocument );
-
-            newChild.parentNode = this;
-            if (newChild.onparentNode.ready) newChild.onparentNode.sendEvent( this );
-            if (this.onchildNodes.ready) this.onchildNodes.sendEvent( newChild );
-            this.ownerDocument.handleDocumentChange( "insertBefore" , 
-                                                     this, 0 );
-            return newChild;
-        }
-    }
-
-    //raise exception
-    return null;
-}
-
-
-/**
-  * Replaces a given LzDataNode in this node's childNodes with a new one.
-  * @param LzDataNode newChild: the LzDataNode to add
-  * @param LzDataNode oldChild: the LzDataNode to be replaced by the newChild
-  * @return LzDataElement: The new child, or null if the oldChild wasn't found
-  */
-function replaceChild (newChild, oldChild){
-
-    this.__LZcoDirty = true;
-    for ( var i = 0; i < this.childNodes.length; i++ ){
-        if ( this.childNodes[ i ] == oldChild ){
-            this.childNodes[ i ] = newChild;
-
-            newChild.setOwnerDocument( this.ownerDocument );
-
-            newChild.parentNode = this;
-            if (newChild.onparentNode.ready) newChild.onparentNode.sendEvent( this );
-            if (this.onchildNodes.ready) this.onchildNodes.sendEvent( newChild );
-            this.ownerDocument.handleDocumentChange( "childNodes" , this , 0, newChild );
-            return newChild;
-        }
-    }
-    //raise exception
-    return null;
-}
-
-/**
-  * Removes a given node from this node's childNodes
-  * @param LzDataNode oldChild: The LzDataNode to remove
-  * @return LzDataNode: The removed child, or null if the oldChild was not found
-  */
-function removeChild (oldChild){
-    var reval = null;
-    this.__LZcoDirty = true;
-    for ( var i = 0; i < this.childNodes.length; i++ ){
-        if ( this.childNodes[ i ] == oldChild ){
-            this.childNodes.splice( i , 1 );
-            if (this.onchildNodes.ready) this.onchildNodes.sendEvent( oldChild );
-            reval = oldChild;
-            this.ownerDocument.handleDocumentChange("removeChild", this, 0, oldChild);
-        }
-    }
-    //raise exception if not found
-    return reval;
-}
-
-/**
-  * Adds a child to this node's list of childNodes
-  * @param LzDataNode newChild: The LzDataNode to add.
-  * @return LzDataNode: The newChild.
-  */
-function appendChild (newChild){
-    if ( this.childNodes ){
-        this.childNodes.push( newChild );
-    } else {
-        this.childNodes = [ newChild ];
-    }
-
-    newChild.setOwnerDocument( this.ownerDocument );
-
-    newChild.parentNode = this;
-    if (newChild.onparentNode.ready) newChild.onparentNode.sendEvent( this );
-
-    //instead of marking dirty, this is easy
-    newChild.__LZo = this.childNodes.length -1;
-
-    if (this.onchildNodes.ready) this.onchildNodes.sendEvent( newChild );
-    this.ownerDocument.handleDocumentChange( "appendChild" , this , 0, newChild );
-    return newChild;
-}
-
-/**
-  * Tests whether or not this node has child nodes.
-  * @return Boolean: If true, this node has child nodes.
-  */
-function hasChildNodes (){
-    return this.childNodes.length > 0;
-}
-
-/**
-  * Returns a copy of this node.
-  * @param Boolean deep: If true, the children of this node will be part of the
-  * new node
-  * @return LzDataNode: A copy of this node.
-  */
-function cloneNode ( deep ){
-    var n = new LzDataElement(this.nodeName);
-    n.setAttrs( this.attributes );
-    if ( deep ){
-        for ( var i = 0 ; i < this.childNodes.length; i++ ){
-            n.appendChild ( this.childNodes[ i ].cloneNode( true ) );
-        }
-    }
-
-    return n;
-}
-
-/**
-  * Returns the value for the give attribute
-  * @param String name: The name of the attribute whose value to return
-  * @return String: The value for the given attribute
-  */
-function getAttr (name){
-    if (this.attributes) return this.attributes[ name ];
-}
-
-/**
-  * @access private
-  */
-prototype.getAttr.dependencies = function (who , self){
-    return [ self, 'attributes' ];
-}
-
-/**
-  * Sets the given attribute to the given value
-  * @param String name: The name of the attribute to set.
-  * @param String value: The value for the attribute.
-  */
-function setAttr (name, value){
-    if ( ! this.attributes ) {
-      this.attributes = {};
-    }
-    this.attributes[ name ] = value;
-    if (this.onattributes.ready) this.onattributes.sendEvent( name );
-    this.ownerDocument.handleDocumentChange( "attributes" , this , 1, {name: name, value: value, type: 'set'});
-    return value;
-}
-
-/**
-  * Removes the named attribute
-  * @param String name: The name of the attribute to remove.
-  */
-function removeAttr (name){
-    var v = this.attributes[ name ];
-    delete this.attributes[ name ];
-    if (this.onattributes.ready) this.onattributes.sendEvent( name );
-    this.ownerDocument.handleDocumentChange( "attributes" , this , 1, {name: name, value: v, type: 'remove'});
-    return v;
-}
-
-/**
-  *This method returns a Attr object.
-  *The name parameter is of type String.
-  */
-//function getAttributeNode (name){
-//}
-
-/**
-  *This method returns a Attr object.
-  *The newAttr parameter is a Attr object.
-  */
-//function setAttrNode (newAttr){
-//}
-
-/**
-  * Tests whether or not this node has a given attribute.
-  * @param String name: The name of the attribute to test
-  * @return Boolean: If true, the named attribute is present.
-  */
-function hasAttr (name){
-    return this.attributes[ name ] != null;
-}
-
-/**
-  * Returns the first child of this node.
-  * @return LzDataNode: The first child of this node
-  */
-function getFirstChild (){
-    return this.childNodes[ 0 ];
-}
-/**
-  * @access private
-  */
-prototype.getFirstChild.dependencies = function( who, self ){
-    return [ this , "childNodes" ];
-}
-
-/**
-  * Returns the last child of this node.
-  * @return LzDataNode: The last child of this node
-  */
-function getLastChild (){
-    return this.childNodes[ this.childNodes.length-1 ];
-}
-/**
-  * @access private
-  */
-prototype.getLastChild.dependencies = function( who, self ){
-    return [ this , "childNodes" ];
-}
-
-
-/**
-  * @access private
-  */
-function __LZupdateCO (){
-    for ( var i = 0; i < this.childNodes.length; i++ ){
-        this.childNodes[ i ].__LZo = i;
-    }
-    this.__LZcoDirty = false;
-}
-
-
-/**
-  * @access private
-  */
-prototype.hasAttr.dependencies = function (who , self){
-    return [ self, 'attributes' ];
-}
-
-/**
-  * Sets the attributes of this node to the given Object.
-  * @param Object attrs: The object to use as the attrs for this node.
-  */
-function setAttrs ( attrs ){
-    var a = {};
-    for ( var k in attrs ){ a[ k ] = attrs[ k ]; }
-
-    this.attributes = a;
-    if (this.onattributes.ready) this.onattributes.sendEvent( a);
-    if (this.ownerDocument) {
-        this.ownerDocument.handleDocumentChange( "attributes" , this , 1);
-    }
-}
-
-/**
-  * Sets the children of this node to the given array.
-  * @param [LzDataNode] children: An array of LzDataNodes to be the new children
-  * of this node
-  */
-function setChildNodes ( children ){
-    this.childNodes = children;
-    for ( var i = 0; i < children.length; i++ ){
-        var c = children[ i ];
-        if (c) {
-            c.setOwnerDocument( this.ownerDocument );
-            c.parentNode = this;
-            if (c.onparentNode) {
-                if (c.onparentNode.ready) c.onparentNode.sendEvent( this );
-            }
-            c.__LZo = i;
-        }
-    }
-    this.__LZcoDirty = false;
-    if (this.onchildNodes) {
-        if (this.onchildNodes.ready) this.onchildNodes.sendEvent( children );
-    }
-    this.ownerDocument.handleDocumentChange( "childNodes" , this , 0);
-}
-
-/**
-  * Sets the name of this node.
-  * @param String name: The new name for this node
-  */
-function setNodeName ( name ){
-    //Debug.write('setting node name from "',this.nodeName, '" to "', name, '"');
-    this.nodeName = name;
-    //since this can affect xpaths, send onchildNodes event
-    if (this.onnodeName.ready) this.onnodeName.sendEvent( name );
-    if (this.parentNode) {
-        if (this.parentNode.onchildNodes.ready) this.parentNode.onchildNodes.sendEvent( this );
-        if (this.parentNode.onchildNode.ready) this.parentNode.onchildNode.sendEvent( this );
-    }
-    this.ownerDocument.handleDocumentChange( "childNodeName" , 
-                                             this.parentNode , 0 );
-    this.ownerDocument.handleDocumentChange( "nodeName" , this, 1 );
-}
-
-/**
-  * @access private
-  */
-function __LZgetText ( ){
-    var s= "";
-    for ( var i = 0; i < this.childNodes.length; i++ ){
-        var c = this.childNodes[ i ]
-        if ( c.nodeType == LzDataNode.TEXT_NODE ){
-            s += c.data;
-        }
-    }
-    return s;
-}
-
-/**
-  * Returns a list of the childNodes of this node which have a given name
-  * @param String name: The name of the node to look for.
-  * @return [LzDataNode]: A list of childNodes which have the given name.
-  */
-function getElementsByTagName (name) {
-    var r = [];
-    for ( var i = 0; i < this.childNodes.length; i++ ){
-        if ( this.childNodes[i].nodeName == name ){
-            r.push( this.childNodes[ i ] );
-        }
-    }
-    return r;
-}
-
-/*
-//This method returns a Attr object.
-//The oldAttr parameter is a Attr object.
-//This method can raise a DOMException object. 
-// function removeAttributeNode (oldAttr) {
-}
-//This method returns a String.
-//The namespaceURI parameter is of type String.
-//The localName parameter is of type String. 
-// function getAttributeNS (namespaceURI, localName) {
-}
-//This method has no return value.
-//The namespaceURI parameter is of type String.
-//The qualifiedName parameter is of type String.
-//The value parameter is of type String.
-//This method can raise a DOMException object. 
-// function setAttrNS (namespaceURI, qualifiedName, 
-                                                                    value) {
-}
-//This method has no return value.
-//The namespaceURI parameter is of type String.
-//The localName parameter is of type String.
-//This method can raise a DOMException object. 
-// function removeAttributeNS (namespaceURI, localName) {
-}
-//This method returns a Attr object.
-//The namespaceURI parameter is of type String.
-//The localName parameter is of type String. 
-// function getAttributeNodeNS (namespaceURI, localName) {
-}
-//This method returns a Attr object.
-//The newAttr parameter is a Attr object.
-//This method can raise a DOMException object. 
-// function setAttrNodeNS (newAttr) {
-}
-//This method returns a NodeList object.
-//The namespaceURI parameter is of type String.
-//The localName parameter is of type String. 
-// function getElementsByTagNameNS (namespaceURI, localName) {
-}
-//This method returns a Boolean.
-//The namespaceURI parameter is of type String.
-//The localName parameter is of type String.
-// function hasAttrNS (namespaceURI, localName) {
-}
-*/
-
-var __LZlt = "<";
-var __LZgt = ">";
-
-
-/**
-  * Returns this node as a string of xml.
-  * @return String: The string serialization of this node.
-  */
-function serialize (){
-    return this.serializeInternal(Infinity);
-}
-
-/**
-  * Implementation of serialize with option to limit string length
-  * @access private
-  */
-function serializeInternal (len) {
-    if (arguments.length < 1) {
-        len = Infinity;
-    }
-    var s = this.__LZlt + this.nodeName;
-
-    //Debug.info('k', this.attributes);
-    for ( var k in this.attributes ){
-        s += " " + k + '="' + LzDataNode.__LZXMLescape( this.attributes[ k ] ) + '"';
-        if (s.length > len) { break; }
-    }
-
-    if ( s.length <= len && this.childNodes && this.childNodes.length ){
-        s += this.__LZgt;
-        for ( var i = 0; i < this.childNodes.length; i++ ){
-            s += this.childNodes[ i ].serialize(len);
-            if (s.length > len) { break; }
-        }
-        s += this.__LZlt + "/" + this.nodeName + this.__LZgt;
-    } else {
-        s += "/" + this.__LZgt;
-    }
-    if (s.length > len) { s = Debug.abbreviate(s, len); }
-    return s;
-}
-
-/**
-  * For debugging.  Same as serialize, but will abbreviate at printLength.
-  * @access private
-  */
-function _dbg_name () {
-    return this.serializeInternal(Debug.printLength);
-}
-
-/**
-  * Nodes call this method on their ownerDocument whenever they change in any 
-  * way. This method sends the onDocumentChange event, which triggers
-  * datapointer updates
-  * @param String what: A description of what changed.
-  * @param LzDataNode who: The node that changed.
-  * @param Number type: private
-  */
-function handleDocumentChange ( what , who , type, cobj ){
-    var o = { who:  who , what: what , type : type};
-    if (cobj) o.cobj = cobj;
-    if ( this.__LZchangeQ ){
-        this.__LZchangeQ.push ( o );
-    } else {
-        if (this.onDocumentChange.ready) this.onDocumentChange.sendEvent( o );
-    }
-}
-
-/**
-  * @access private
-  */
-function toString (){
-    //this.__LZlt = "&lt;";
-    //this.__LZgt = "&gt;";
-    var r = this.serialize();
-    //delete this.__LZlt;
-    //delete this.__LZgt;
-    return r;
-}
-
-/**
-  * @access private
-  */
-function __LZdoLock ( locker ){
-    if ( !this.__LZchangeQ ){
-        this.__LZchangeQ = [];
-        this.__LZlocker = locker;
-    }
-}
-
-
-/**
-  * @access private
-  */
-function __LZdoUnlock ( locker ){
-    
-    if ( this.__LZlocker != locker ){
-        return;
-    }
-
-    var lzq = this.__LZchangeQ;
-    this.__LZchangeQ = null;
-
-    if (lzq != null) {
-        for ( var i = 0; i < lzq.length; i++ ){
-            var sendit = true;
-            var tc = lzq[ i ];
-            for ( var j = 0; j < i; j++ ){
-                var oc = lzq[ j ];
-                if ( tc.who == oc.who &&
-                     tc.what == oc.what &&
-                     tc.type == oc.type ){
-                    sendit = false;
-                    break;
-                }
-            }
-
-            if ( sendit ){
-                this.handleDocumentChange ( tc.what, tc.who, tc.type );
-            }
-        }
-    }
-    
-
-}
-
-/**
-  * Get LzDataElement representation of primitive type, array, or object value.
-  */
-static function valueToElement ( o ) {
-    var n = new LzDataElement("element", { }, LzMiniNode_DataNode_DOM.__LZv2E(o));
-    return n; 
-}
-
-/**
-  * @param Type o: primitive type, array, or object value.
-  * @return array of LzDataElements
-  * @access private
-  */
-static function __LZv2E ( o ) {
-
-    var type = typeof( o );
-    type.toLowerCase();
-
-    var c = [];
-    if (type == "object") {
-        if ( o instanceof LzDataElement ||
-             o instanceof LzDataText ) {
-            c[0] = o;
-        } else if (o instanceof Date) {
-
-            type = "date";
-            // FIXME: [2004-04-10 pkang] what should we do with dates?
-
-        } else if (o instanceof Array) {
-            type = "array";
-            var tag = (o.__LZtag != null ? o.__LZtag : 'item');
-            for (var i=0; i < o.length; i++) {
-                var tmpC = LzMiniNode_DataNode_DOM.__LZv2E( o[i] );
-                c[i] = new LzDataElement(tag, null, tmpC ); 
-            }
-        } else {
-            type = "struct";
-            var i = 0;
-            for (var k in o) {
-                // skip any properties that start with __LZ
-                if (k.indexOf('__LZ') == 0) continue;
-                c[i++] = new LzDataElement(k, null, LzMiniNode_DataNode_DOM.__LZv2E(o[k]));
-            }
-        }
-    } else if (o != null) {
-        c[0] = new LzDataText( o );
-    }
-
-    if (c.length == 0) c = null;
-
-    return c;
-}
-// End of Manual include
-}
-
-
-
-// *********************
-// *                   *
-// *  LzNode_DataNode  *
-// *                   *
-// *********************
-
-class LzNode_DataNode extends LzNode
-{
-//    #include "data/LzDataNode.lzs"
-// Manual include of LzDataNode.lzs
-var onownerDocument = LzDeclaredEvent;
-
-
-/** The type of this node -- ELEMENT_NODE or TEXT_NODE
-  * @type Number
-  * @keywords abstract
-  */
-var nodeType; // This is undefined. Set elsewhere
-
-/**
-  * Returns the sibling before this one this node's parentNodes List of children
-  * @return LzDataNode: The node preceeding this one in this node's childNodes
-  */
-function getPreviousSibling (){
-    if (!this.parentNode) return null;
-    if ( this.parentNode.__LZcoDirty ) this.parentNode.__LZupdateCO();
-    return this.parentNode.childNodes[ this.__LZo - 1 ];
-}
-
-/**
- * Returns the parent of this node
- * @return LzDataNode: the parent of this node
- */
-function getParent () {
-  return this.parentNode;
-}
-
-/**
-  * gets offset of node in parent's childNodes array
-  * @return number
-  */
-function getOffset (){
-    if (!this.parentNode) return 0;
-    if (this.parentNode.__LZcoDirty) this.parentNode.__LZupdateCO();
-
-    return this.__LZo;
-}
-
-/**
-  * @access private
-  */
-prototype.getPreviousSibling.dependencies = function( who, self ){
-    return [ this.parentNode , "childNodes" , this , "parentNode" ];
-}
-
-/**
-  * Returns the sibling after this one this node's parentNodes List of children
-  * @return LzDataNode: The node succeeding this one in this node's childNodes
-  */
-function getNextSibling (){
-    if (!this.parentNode) return null;
-    if ( this.parentNode.__LZcoDirty ) this.parentNode.__LZupdateCO();
-    return this.parentNode.childNodes[ this.__LZo + 1 ];
-}
-
-/**
-  * @access private
-  */
-prototype.getNextSibling.dependencies = function( who, self ){
-    return [ this.parentNode , "childNodes" , this , "parentNode" ];
-}
-
-/**
-  * Tells whether the given node is above this one in the node hierarchy.
-  * @param LzDataElement el: The LzDataElement to test to see if it is above
-  * this one
-  * @param Boolean allowself: If true, this function returns true if the given
-  * node is the same as this node.
-  */
-function childOf ( el , allowself ) {
-    var p = allowself ? this : this.parentNode
-    while ( p ){
-        if ( p == el ) return true;
-        p = p.parentNode;
-    }
-    return false;
-}
-
-/**
-  * Sets the LzDataNode which is the ownerDocument for this node.
-  * @param LzDataNode ownerDoc: The LzDataNode to act as the ownerDocument for
-  * this node.
-  */
-function setOwnerDocument ( ownerDoc ){
-    this.ownerDocument = ownerDoc;
-    if (this.childNodes) {
-        for ( var i = 0; i < this.childNodes.length; i++ ){
-            this.childNodes[ i ] .setOwnerDocument( ownerDoc );
-        }
-    }
-
-    if (this.onownerDocument && this.onownerDocument.ready) {
-        this.onownerDocument.sendEvent( ownerDoc );
-    }
-}
-
-
-/**
-  * @access private
-  */
-function __LZlockFromUpdate ( locker ){
-    this.ownerDocument.__LZdoLock( locker );
-}
-
-/**
-  * @access private
-  */
-function __LZunlockFromUpdate ( locker ){
-    this.ownerDocument.__LZdoUnlock( locker );
-}
-
-// End of Manual include
-}
-
-
-// *************************
-// *                       *
-// *  LzNode_DataNode_DOM  *
-// *                       *
-// *************************
-
-// class LzMiniNode_DataNode_DOM = LzMiniNode + LzDataNode + LzDataDOM
-class LzNode_DataNode_DOM extends LzNode_DataNode
-{
-//    #include "data/LzDataDOM.lzs"
-// Manual include of LzDataDOM.lzs
-    static function initialize (prototype) {
-//       Debug.debug('LzDataElementTraitInitialize')
-      // There will be no setters property in the trait prototype,
-      // (and you don't want one there! as it would shadow the one
-      // from LzNode) but it will be there after LzNode.initialize
-      // runs
-      if (prototype.hasOwnProperty('setters')) {
-        // since you can't assign directly to these slots...
-        // until LzNode.initialize has run
-        prototype.setters.attributes = "setAttrs";
-        prototype.setters.childNodes = "setChildNodes";
-        prototype.setters.nodeName = "setNodeName";
-        // Shouldn't be directly settable
-        prototype.setters.ownerDocument = "setOwnerDocument";
-      }
-    }
-
-/** @lzxtype event */
-var onDocumentChange = LzDeclaredEvent;
-/** @lzxtype event */
-var onparentNode = LzDeclaredEvent;
-/** @lzxtype event */
-var onchildNode = LzDeclaredEvent;
-/** @lzxtype event */
-var onchildNodes = LzDeclaredEvent;
-/** @lzxtype event */
-var onattributes = LzDeclaredEvent;
-/** @lzxtype event */
-var onnodeName = LzDeclaredEvent;
-
-/** @access private */
-var __LZo = -1;
-/** @access private */
-var __LZcoDirty = true;
-/** @access private */
-var __LZchangeQ = null;
-/** @access private */
-var __LZlocker = null;
-
-
-/** Inserts the given LzDataNode before another node in this node's childNodes
-  * @param LzDataNode newChild: the LzDataNode to insert
-  * @param LzDataNode refChild: the LzDataNode to insert newChild before
-  * @return LzDataElement: The new child, or null if the refChild wasn't found
-  */
-function insertBefore (newChild, refChild){
-    this.__LZcoDirty = true;
-
-    for ( var i = 0; i < this.childNodes.length; i++ ){
-        if ( this.childNodes[ i ] == refChild ){
-            this.childNodes.splice( i , 0 , newChild );
-            newChild.setOwnerDocument( this.ownerDocument );
-
-            newChild.parentNode = this;
-            if (newChild.onparentNode.ready) newChild.onparentNode.sendEvent( this );
-            if (this.onchildNodes.ready) this.onchildNodes.sendEvent( newChild );
-            this.ownerDocument.handleDocumentChange( "insertBefore" , 
-                                                     this, 0 );
-            return newChild;
-        }
-    }
-
-    //raise exception
-    return null;
-}
-
-
-/**
-  * Replaces a given LzDataNode in this node's childNodes with a new one.
-  * @param LzDataNode newChild: the LzDataNode to add
-  * @param LzDataNode oldChild: the LzDataNode to be replaced by the newChild
-  * @return LzDataElement: The new child, or null if the oldChild wasn't found
-  */
-function replaceChild (newChild, oldChild){
-
-    this.__LZcoDirty = true;
-    for ( var i = 0; i < this.childNodes.length; i++ ){
-        if ( this.childNodes[ i ] == oldChild ){
-            this.childNodes[ i ] = newChild;
-
-            newChild.setOwnerDocument( this.ownerDocument );
-
-            newChild.parentNode = this;
-            if (newChild.onparentNode.ready) newChild.onparentNode.sendEvent( this );
-            if (this.onchildNodes.ready) this.onchildNodes.sendEvent( newChild );
-            this.ownerDocument.handleDocumentChange( "childNodes" , this , 0, newChild );
-            return newChild;
-        }
-    }
-    //raise exception
-    return null;
-}
-
-/**
-  * Removes a given node from this node's childNodes
-  * @param LzDataNode oldChild: The LzDataNode to remove
-  * @return LzDataNode: The removed child, or null if the oldChild was not found
-  */
-function removeChild (oldChild){
-    var reval = null;
-    this.__LZcoDirty = true;
-    for ( var i = 0; i < this.childNodes.length; i++ ){
-        if ( this.childNodes[ i ] == oldChild ){
-            this.childNodes.splice( i , 1 );
-            if (this.onchildNodes.ready) this.onchildNodes.sendEvent( oldChild );
-            reval = oldChild;
-            this.ownerDocument.handleDocumentChange("removeChild", this, 0, oldChild);
-        }
-    }
-    //raise exception if not found
-    return reval;
-}
-
-/**
-  * Adds a child to this node's list of childNodes
-  * @param LzDataNode newChild: The LzDataNode to add.
-  * @return LzDataNode: The newChild.
-  */
-function appendChild (newChild){
-    if ( this.childNodes ){
-        this.childNodes.push( newChild );
-    } else {
-        this.childNodes = [ newChild ];
-    }
-
-    newChild.setOwnerDocument( this.ownerDocument );
-
-    newChild.parentNode = this;
-    if (newChild.onparentNode.ready) newChild.onparentNode.sendEvent( this );
-
-    //instead of marking dirty, this is easy
-    newChild.__LZo = this.childNodes.length -1;
-
-    if (this.onchildNodes.ready) this.onchildNodes.sendEvent( newChild );
-    this.ownerDocument.handleDocumentChange( "appendChild" , this , 0, newChild );
-    return newChild;
-}
-
-/**
-  * Tests whether or not this node has child nodes.
-  * @return Boolean: If true, this node has child nodes.
-  */
-function hasChildNodes (){
-    return this.childNodes.length > 0;
-}
-
-/**
-  * Returns a copy of this node.
-  * @param Boolean deep: If true, the children of this node will be part of the
-  * new node
-  * @return LzDataNode: A copy of this node.
-  */
-function cloneNode ( deep ){
-    var n = new LzDataElement(this.nodeName);
-    n.setAttrs( this.attributes );
-    if ( deep ){
-        for ( var i = 0 ; i < this.childNodes.length; i++ ){
-            n.appendChild ( this.childNodes[ i ].cloneNode( true ) );
-        }
-    }
-
-    return n;
-}
-
-/**
-  * Returns the value for the give attribute
-  * @param String name: The name of the attribute whose value to return
-  * @return String: The value for the given attribute
-  */
-function getAttr (name){
-    if (this.attributes) return this.attributes[ name ];
-}
-
-/**
-  * @access private
-  */
-prototype.getAttr.dependencies = function (who , self){
-    return [ self, 'attributes' ];
-}
-
-/**
-  * Sets the given attribute to the given value
-  * @param String name: The name of the attribute to set.
-  * @param String value: The value for the attribute.
-  */
-function setAttr (name, value){
-    if ( ! this.attributes ) {
-      this.attributes = {};
-    }
-    this.attributes[ name ] = value;
-    if (this.onattributes.ready) this.onattributes.sendEvent( name );
-    this.ownerDocument.handleDocumentChange( "attributes" , this , 1, {name: name, value: value, type: 'set'});
-    return value;
-}
-
-/**
-  * Removes the named attribute
-  * @param String name: The name of the attribute to remove.
-  */
-function removeAttr (name){
-    var v = this.attributes[ name ];
-    delete this.attributes[ name ];
-    if (this.onattributes.ready) this.onattributes.sendEvent( name );
-    this.ownerDocument.handleDocumentChange( "attributes" , this , 1, {name: name, value: v, type: 'remove'});
-    return v;
-}
-
-/**
-  *This method returns a Attr object.
-  *The name parameter is of type String.
-  */
-//function getAttributeNode (name){
-//}
-
-/**
-  *This method returns a Attr object.
-  *The newAttr parameter is a Attr object.
-  */
-//function setAttrNode (newAttr){
-//}
-
-/**
-  * Tests whether or not this node has a given attribute.
-  * @param String name: The name of the attribute to test
-  * @return Boolean: If true, the named attribute is present.
-  */
-function hasAttr (name){
-    return this.attributes[ name ] != null;
-}
-
-/**
-  * Returns the first child of this node.
-  * @return LzDataNode: The first child of this node
-  */
-function getFirstChild (){
-    return this.childNodes[ 0 ];
-}
-/**
-  * @access private
-  */
-prototype.getFirstChild.dependencies = function( who, self ){
-    return [ this , "childNodes" ];
-}
-
-/**
-  * Returns the last child of this node.
-  * @return LzDataNode: The last child of this node
-  */
-function getLastChild (){
-    return this.childNodes[ this.childNodes.length-1 ];
-}
-/**
-  * @access private
-  */
-prototype.getLastChild.dependencies = function( who, self ){
-    return [ this , "childNodes" ];
-}
-
-
-/**
-  * @access private
-  */
-function __LZupdateCO (){
-    for ( var i = 0; i < this.childNodes.length; i++ ){
-        this.childNodes[ i ].__LZo = i;
-    }
-    this.__LZcoDirty = false;
-}
-
-
-/**
-  * @access private
-  */
-prototype.hasAttr.dependencies = function (who , self){
-    return [ self, 'attributes' ];
-}
-
-/**
-  * Sets the attributes of this node to the given Object.
-  * @param Object attrs: The object to use as the attrs for this node.
-  */
-function setAttrs ( attrs ){
-    var a = {};
-    for ( var k in attrs ){ a[ k ] = attrs[ k ]; }
-
-    this.attributes = a;
-    if (this.onattributes.ready) this.onattributes.sendEvent( a);
-    if (this.ownerDocument) {
-        this.ownerDocument.handleDocumentChange( "attributes" , this , 1);
-    }
-}
-
-/**
-  * Sets the children of this node to the given array.
-  * @param [LzDataNode] children: An array of LzDataNodes to be the new children
-  * of this node
-  */
-function setChildNodes ( children ){
-    this.childNodes = children;
-    for ( var i = 0; i < children.length; i++ ){
-        var c = children[ i ];
-        if (c) {
-            c.setOwnerDocument( this.ownerDocument );
-            c.parentNode = this;
-            if (c.onparentNode) {
-                if (c.onparentNode.ready) c.onparentNode.sendEvent( this );
-            }
-            c.__LZo = i;
-        }
-    }
-    this.__LZcoDirty = false;
-    if (this.onchildNodes) {
-        if (this.onchildNodes.ready) this.onchildNodes.sendEvent( children );
-    }
-    this.ownerDocument.handleDocumentChange( "childNodes" , this , 0);
-}
-
-/**
-  * Sets the name of this node.
-  * @param String name: The new name for this node
-  */
-function setNodeName ( name ){
-    //Debug.write('setting node name from "',this.nodeName, '" to "', name, '"');
-    this.nodeName = name;
-    //since this can affect xpaths, send onchildNodes event
-    if (this.onnodeName.ready) this.onnodeName.sendEvent( name );
-    if (this.parentNode) {
-        if (this.parentNode.onchildNodes.ready) this.parentNode.onchildNodes.sendEvent( this );
-        if (this.parentNode.onchildNode.ready) this.parentNode.onchildNode.sendEvent( this );
-    }
-    this.ownerDocument.handleDocumentChange( "childNodeName" , 
-                                             this.parentNode , 0 );
-    this.ownerDocument.handleDocumentChange( "nodeName" , this, 1 );
-}
-
-/**
-  * @access private
-  */
-function __LZgetText ( ){
-    var s= "";
-    for ( var i = 0; i < this.childNodes.length; i++ ){
-        var c = this.childNodes[ i ]
-        if ( c.nodeType == LzDataNode.TEXT_NODE ){
-            s += c.data;
-        }
-    }
-    return s;
-}
-
-/**
-  * Returns a list of the childNodes of this node which have a given name
-  * @param String name: The name of the node to look for.
-  * @return [LzDataNode]: A list of childNodes which have the given name.
-  */
-function getElementsByTagName (name) {
-    var r = [];
-    for ( var i = 0; i < this.childNodes.length; i++ ){
-        if ( this.childNodes[i].nodeName == name ){
-            r.push( this.childNodes[ i ] );
-        }
-    }
-    return r;
-}
-
-/*
-//This method returns a Attr object.
-//The oldAttr parameter is a Attr object.
-//This method can raise a DOMException object. 
-// function removeAttributeNode (oldAttr) {
-}
-//This method returns a String.
-//The namespaceURI parameter is of type String.
-//The localName parameter is of type String. 
-// function getAttributeNS (namespaceURI, localName) {
-}
-//This method has no return value.
-//The namespaceURI parameter is of type String.
-//The qualifiedName parameter is of type String.
-//The value parameter is of type String.
-//This method can raise a DOMException object. 
-// function setAttrNS (namespaceURI, qualifiedName, 
-                                                                    value) {
-}
-//This method has no return value.
-//The namespaceURI parameter is of type String.
-//The localName parameter is of type String.
-//This method can raise a DOMException object. 
-// function removeAttributeNS (namespaceURI, localName) {
-}
-//This method returns a Attr object.
-//The namespaceURI parameter is of type String.
-//The localName parameter is of type String. 
-// function getAttributeNodeNS (namespaceURI, localName) {
-}
-//This method returns a Attr object.
-//The newAttr parameter is a Attr object.
-//This method can raise a DOMException object. 
-// function setAttrNodeNS (newAttr) {
-}
-//This method returns a NodeList object.
-//The namespaceURI parameter is of type String.
-//The localName parameter is of type String. 
-// function getElementsByTagNameNS (namespaceURI, localName) {
-}
-//This method returns a Boolean.
-//The namespaceURI parameter is of type String.
-//The localName parameter is of type String.
-// function hasAttrNS (namespaceURI, localName) {
-}
-*/
-
-var __LZlt = "<";
-var __LZgt = ">";
-
-
-/**
-  * Returns this node as a string of xml.
-  * @return String: The string serialization of this node.
-  */
-function serialize (){
-    return this.serializeInternal(Infinity);
-}
-
-/**
-  * Implementation of serialize with option to limit string length
-  * @access private
-  */
-function serializeInternal (len) {
-    if (arguments.length < 1) {
-        len = Infinity;
-    }
-    var s = this.__LZlt + this.nodeName;
-
-    //Debug.info('k', this.attributes);
-    for ( var k in this.attributes ){
-        s += " " + k + '="' + LzDataNode.__LZXMLescape( this.attributes[ k ] ) + '"';
-        if (s.length > len) { break; }
-    }
-
-    if ( s.length <= len && this.childNodes && this.childNodes.length ){
-        s += this.__LZgt;
-        for ( var i = 0; i < this.childNodes.length; i++ ){
-            s += this.childNodes[ i ].serialize(len);
-            if (s.length > len) { break; }
-        }
-        s += this.__LZlt + "/" + this.nodeName + this.__LZgt;
-    } else {
-        s += "/" + this.__LZgt;
-    }
-    if (s.length > len) { s = Debug.abbreviate(s, len); }
-    return s;
-}
-
-/**
-  * For debugging.  Same as serialize, but will abbreviate at printLength.
-  * @access private
-  */
-function _dbg_name () {
-    return this.serializeInternal(Debug.printLength);
-}
-
-/**
-  * Nodes call this method on their ownerDocument whenever they change in any 
-  * way. This method sends the onDocumentChange event, which triggers
-  * datapointer updates
-  * @param String what: A description of what changed.
-  * @param LzDataNode who: The node that changed.
-  * @param Number type: private
-  */
-function handleDocumentChange ( what , who , type, cobj ){
-    var o = { who:  who , what: what , type : type};
-    if (cobj) o.cobj = cobj;
-    if ( this.__LZchangeQ ){
-        this.__LZchangeQ.push ( o );
-    } else {
-        if (this.onDocumentChange.ready) this.onDocumentChange.sendEvent( o );
-    }
-}
-
-/**
-  * @access private
-  */
-function toString (){
-    //this.__LZlt = "&lt;";
-    //this.__LZgt = "&gt;";
-    var r = this.serialize();
-    //delete this.__LZlt;
-    //delete this.__LZgt;
-    return r;
-}
-
-/**
-  * @access private
-  */
-function __LZdoLock ( locker ){
-    if ( !this.__LZchangeQ ){
-        this.__LZchangeQ = [];
-        this.__LZlocker = locker;
-    }
-}
-
-
-/**
-  * @access private
-  */
-function __LZdoUnlock ( locker ){
-    
-    if ( this.__LZlocker != locker ){
-        return;
-    }
-
-    var lzq = this.__LZchangeQ;
-    this.__LZchangeQ = null;
-
-    if (lzq != null) {
-        for ( var i = 0; i < lzq.length; i++ ){
-            var sendit = true;
-            var tc = lzq[ i ];
-            for ( var j = 0; j < i; j++ ){
-                var oc = lzq[ j ];
-                if ( tc.who == oc.who &&
-                     tc.what == oc.what &&
-                     tc.type == oc.type ){
-                    sendit = false;
-                    break;
-                }
-            }
-
-            if ( sendit ){
-                this.handleDocumentChange ( tc.what, tc.who, tc.type );
-            }
-        }
-    }
-    
-
-}
-
-/**
-  * Get LzDataElement representation of primitive type, array, or object value.
-  */
-static function valueToElement ( o ) {
-    var n = new LzDataElement("element", { }, LzNode_DataNode_DOM.__LZv2E(o));
-    return n; 
-}
-
-/**
-  * @param Type o: primitive type, array, or object value.
-  * @return array of LzDataElements
-  * @access private
-  */
-static function __LZv2E ( o ) {
-
-    var type = typeof( o );
-    type.toLowerCase();
-
-    var c = [];
-    if (type == "object") {
-        if ( o instanceof LzDataElement ||
-             o instanceof LzDataText ) {
-            c[0] = o;
-        } else if (o instanceof Date) {
-
-            type = "date";
-            // FIXME: [2004-04-10 pkang] what should we do with dates?
-
-        } else if (o instanceof Array) {
-            type = "array";
-            var tag = (o.__LZtag != null ? o.__LZtag : 'item');
-            for (var i=0; i < o.length; i++) {
-                var tmpC = LzNode_DataNode_DOM.__LZv2E( o[i] );
-                c[i] = new LzDataElement(tag, null, tmpC ); 
-            }
-        } else {
-            type = "struct";
-            var i = 0;
-            for (var k in o) {
-                // skip any properties that start with __LZ
-                if (k.indexOf('__LZ') == 0) continue;
-                c[i++] = new LzDataElement(k, null, LzNode_DataNode_DOM.__LZv2E(o[k]));
-            }
-        }
-    } else if (o != null) {
-        c[0] = new LzDataText( o );
-    }
-
-    if (c.length == 0) c = null;
-
-    return c;
-}
-// End of Manual include
-}

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzParam.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzParam.lzs	2008-04-02 21:18:03 UTC (rev 8529)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzParam.lzs	2008-04-03 00:12:53 UTC (rev 8530)
@@ -49,11 +49,17 @@
 //undefine all setters but name and id
 //setters.$hasdefaultattrs = -1;
 
+var d:* = null;
 
+
 /**
   * @access private
   */
-function construct ( parent , args ){
+    function LzParam ( parent:* = null, attrs:* = null, children:* = null, instcall:*  = null) {
+        super(parent,attrs,children,instcall);
+    }  
+
+override function construct ( parent , args ){
     super.construct.apply(this, arguments);
     this.d = {};
 }
@@ -81,7 +87,7 @@
 /**
   * @access private
   */
-function createChildren ( children ){
+override function createChildren ( children ){
     //Debug.write( "got children: " + children );
 }
 
@@ -135,7 +141,7 @@
   * @param String val: The value to set
   * @param Boolean enc: If true, URI-encodes the value
   */
-function setValue(name, val, enc) {
+function setValue(name, val, enc = null) {
     if (enc) val = encodeURIComponent(val);
     var a = this.d[ name ];
     if ( a == null ) {
@@ -274,7 +280,7 @@
   * Returns a string representation using the current separator and delimiter 
   * @return String : All names and values for this object
   */
-function toString() {
+override function toString() {
     return this.serialize();
 }
 
@@ -285,7 +291,7 @@
   * @param Boolean uriencode: If true, uri-encode values
   * @return: String representation of parameters
   */
-function serialize( sep , delim , uriencode ){
+function serialize( sep = null, delim = null, uriencode = null ){
     var sep = sep == null ? this.sep : sep;
     var dlm = delim == null ? this.dlm : delim;
 
@@ -310,4 +316,5 @@
 } // End of LzParam
 
 // Fixes LPP-3030 toString() in IE 6+ - the function declaration doesn't work...
+// FIXME: [2008-03-31 pbr] Is this needed?
 LzParam.prototype.toString = LzParam.prototype.serialize;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzParsedPath.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzParsedPath.lzs	2008-04-02 21:18:03 UTC (rev 8529)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzParsedPath.lzs	2008-04-03 00:12:53 UTC (rev 8530)
@@ -240,7 +240,8 @@
                         this.operator = "serialize";
                         this.operatorArgs = 0;
                     } else {
-                        this.gotError( "Unknown operator: " + cnode );
+// [2008-03-18 pbr] no gotError in this class
+//                        this.gotError( "Unknown operator: " + cnode );
                     }
                     continue;
                 } else if ( cnode == "" ){
@@ -372,6 +373,8 @@
   */
 class AnonDatasetGenerator {
 
+var pp;
+
 /**
   * @access private
   */

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzReplicationManager.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzReplicationManager.lzs	2008-04-02 21:18:03 UTC (rev 8529)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzReplicationManager.lzs	2008-04-03 00:12:53 UTC (rev 8530)
@@ -83,19 +83,32 @@
   * replication manager will always destroy views whose data has changed and
   * create new ones.
   */
-var pooling = false;
-function $lzc$set_sortpath(v) { this.setOrder(v); }
+// var pooling = false;
+
+function $lzc$set_sortpath(v) { this.setOrder(v, 'sortpath'); }
 function $lzc$set_sortorder(v) { this.setComparator(v); }
-function $lzc$set_datapath(v) { this.setXPath(v); }
+override function $lzc$set_datapath(v) { this.setXPath(v); }
+
 var asyncnew = true;
+var initialnodes;
+var clonePool;
+var cloneClass;
+var cloneParent;
+var cloneAttrs;
+var cloneChildren;
+var hasdata;
+var _t;
+var orderpath;
 
-// FIXME [2006-10-23 pbr] (LPP-2397) Uncomment 'override' when implemented
-/** @modifiers override */ var datacontrolsvisibility = false; // Defined in LzDatapath
+var comp_orderf;  // Was this.orderf.comp
+var op_orderf;    // Was this.orderf.op
+
+// var datacontrolsvisibility = false; // Defined in LzDatapath
 /** 
   * @modifiers override
   * @access private
   */ 
-var __LZtakeDPSlot = false;
+// var __LZtakeDPSlot = false;
 
 var visible = true;
 /** @access private */
@@ -121,7 +134,18 @@
 /**
   * @access private
   */
-function construct ( odp , args ){
+function LzReplicationManager ( odp , args, children:* = null, instcall:* = null ){
+    //the real parent for this is datapaths view's (immediateparent) parent
+    super(odp, args, children, instcall);
+}
+
+override function construct ( odp , args ){
+    this.__LZtakeDPSlot = false; // Defined in LzDatapath
+    this.datacontrolsvisibility = false; // Defined in LzDatapath
+
+    if (this.pooling == null)
+        this.pooling = false; // Defined in LzDatapath
+
     //odp: original datapath
     var view = odp.immediateparent;
     if (view == canvas) {
@@ -151,7 +175,7 @@
     if (id != null) {
       args.id = id;
       // remove any LzNode with this id
-      if (global[id] instanceof LzNode) global[id] = null;
+      if (global[id] is LzNode) global[id] = null;
     }
 
     //don't want to rerunxpath
@@ -173,7 +197,7 @@
         if ( odp.__LZdotdotCheckDel ){
             odp.__LZdotdotCheckDel.unregisterAll();
         }
-        delete odp.__LZspecialDotDot;
+        odp.__LZspecialDotDot = null;
     }
         
 
@@ -238,9 +262,7 @@
         this.__LZpreventXPathUpdate = false;
     }
 
-    if (this.__LZsetCloneAttrs) {
-        this.__LZsetCloneAttrs();
-    }
+    this.__LZsetCloneAttrs();
 
 
     if ( view._instanceChildren ){
@@ -286,6 +308,12 @@
 /**
   * @access private
   */
+// See subclasses for definition
+function __LZsetCloneAttrs () {}
+
+/**
+  * @access private
+  */
 static function __LZemptyFuntion ( ){
     return;
 }
@@ -293,9 +321,9 @@
 /**
   * @access private
   */
-function constructWithArgs ( args ){
+override function constructWithArgs ( args ){
     this.__LZHandleMultiNodes( this.initialnodes );
-    delete this.initialnodes;
+    this.initialnodes = null;
     if ( this.visible == false ){
         this.setVisible( false );
     }
@@ -304,7 +332,7 @@
 /**
   * @access private
   */
-function setDataContext ( p , implicit ){
+override function setDataContext ( p , implicit = null ){
     var args = arguments; 
     if (p == null && this.immediateparent != null && 'datapath' in this.immediateparent && this.immediateparent.datapath != null){
         args[0] = this.immediateparent.datapath;
@@ -316,7 +344,8 @@
 /**
   * @access private
   */
-function getNodeOffset ( p ){
+// [2008-02-08 pbr] Renamed to avoid conflict with LzDatapointer
+function _getNodeOffset ( p ){
     if (this.nodes != null) {
         var l = this.nodes.length; 
         for ( var i = 0; i < l; i++ ){
@@ -339,7 +368,7 @@
 /**
   * @access private
   */
-function __LZHandleNoNodes( n ) {
+override function __LZHandleNoNodes() {
     this.nodes = [];
     while ( this.clones.length ){
         if ( this.pooling ){
@@ -354,7 +383,7 @@
 /**
   * @access private
   */
-function __LZHandleSingleNode ( n ){ 
+override function __LZHandleSingleNode ( n ){ 
     this.__LZHandleMultiNodes( [n] );
 }
 
@@ -395,7 +424,7 @@
 /**
   * @access private
   */
-function __LZHandleMultiNodes ( n ){
+override function __LZHandleMultiNodes ( n ){
     var layouts = this.parent && this.parent.layouts ? this.parent.layouts : [];
     for (var i in layouts) {
         layouts[i].lock();
@@ -466,24 +495,25 @@
 /**
   * @access private
   */
+//PBR TODO
 function orderf ( a , b ){
     //a and b are dataset nodes
 
 
-    var op = arguments.callee.op;
+    var op = this.op_orderf;
 
     this.p = a;
     var aa = this.xpathQuery( op );
     this.p = b;
     var bb = this.xpathQuery( op );
-    delete this.p;
+    this.p = null;
 
     //this is lame, but comparison with null and "" doens't work right
     //so use newline
     if ( aa == null || aa == "" ) aa ="\n";
     if ( bb == null || bb == "" ) bb ="\n";
 
-    return arguments.callee.comp( aa , bb )
+    return this.comp_orderf( aa , bb )
 }
 
 
@@ -510,7 +540,7 @@
   * @param Function|String comparator: See the <code>comparator</code> paramater
   * of <code>setComparator</code> for details.
   */
-function setOrder( xpath , comparator ) {
+override function setOrder( xpath , comparator ) {
     this.orderpath = null;
 
     //handle case where this was called by a setter, in which case second
@@ -521,13 +551,13 @@
     //both null and as a boolean
     if ( comparator ||
          comparator != null || 
-         typeof( this.orderf.comp ) != "function" ){
+         typeof( this.comp_orderf ) != "function" ){
         this.setComparator( comparator );
     }
 
     this.orderpath = xpath;
 
-    this.orderf.op = this.orderpath;
+    this.op_orderf = this.orderpath;
 
     if ( this.nodes.length ){
         //reset nodes in order now
@@ -545,7 +575,7 @@
   * first, -1 if the first argument should follow the second, and 0 if the two
   * arguments are equivalent
   */
-function setComparator( comparator ){
+override function setComparator( comparator ){
     if ( typeof( comparator ) != "function" ){
         if ( comparator == "descending" ){
             comparator = this.descDict;
@@ -554,7 +584,7 @@
         }
     }
 
-    this.orderf.comp = comparator;
+    this.comp_orderf = comparator;
 
     if ( this.orderpath != null && this.nodes.length ){
         //reset nodes in order now
@@ -565,7 +595,7 @@
 /**
   * @access private
   */
-function getNewClone ( forceNew ){
+function getNewClone ( forceNew = null ){
     if (!this.cloneParent) {
         return null;
     }
@@ -609,14 +639,14 @@
   * comment on the class as a whole, above.)
   * @param String xp: An xpath.
   */
-function setDatapath ( xp ){
+override function setDatapath ( xp ){
     this.setXPath( xp );
 }
 
 /**
   * @access private
   */
-function setXPath ( xp ){
+override function setXPath ( xp ){
     if ( this.__LZpreventXPathUpdate ) return;
     super.setXPath.apply(this, arguments); 
 }
@@ -641,7 +671,7 @@
   * @param LzDataElement p: The data node for which to return the clone.
   * @return LzView: A clone mapped to the given data.
   */
-function getCloneForNode ( p ){
+function getCloneForNode ( p, dontmake=null ){
     var l = this.clones.length; 
     for ( var i = 0; i < l; i++ ){
         if ( this.clones[ i ].datapath.p == p ){
@@ -653,7 +683,7 @@
 /**
   * @access private
   */
-function toString (){
+override function toString (){
     return "ReplicationManager in " + this.immediateparent;
 }
 
@@ -673,20 +703,20 @@
 /**
   * @access private
   */
-function __LZHandleDocChange ( who ){
+override function __LZHandleDocChange ( who ){
     //this enables the old ondata test
     this.p = this.context.getContext();
     super.__LZHandleDocChange.apply(this, arguments);
-    delete this.p;
+    this.p = null;
 }
 
 /**
   * @access private
   */
-function __LZcheckChange ( chgpkg ){
+override function __LZcheckChange ( chgpkg ){
     this.p = this.nodes[ 0 ];
     var didrun = super.__LZcheckChange.apply(this, arguments);
-    delete this.p;
+    this.p = null;
 
     if ( !didrun ){
         var who = chgpkg.who;
@@ -696,7 +726,7 @@
             if ( cl.datapath.__LZneedsOpUpdate( chgpkg ) ){
                 cl.datapath.__LZsetData();
             }
-            if ( who.childOf( cl.datapath.p , true ) ){
+            if ( who.childOfNode( cl.datapath.p , true ) ){
                 if (cl.datapath.onDocumentChange.ready) cl.datapath.onDocumentChange.sendEvent( chgpkg ) ;
             }
         }
@@ -705,12 +735,12 @@
 
 
 /** @access private */
-function __LZneedsOpUpdate (){ return false }
+override function __LZneedsOpUpdate ( chgpkg = null ){ return false }
 
 /**
   * @access private
   */
-function getContext ( chgpkg ){
+override function getContext ( chgpkg = null ){
     return this.nodes[ 0 ];
 }
 
@@ -773,7 +803,7 @@
 /**
   * @access private
   */
-function updateData ( a , b ){
+override function updateData () {
     var l = this.clones.length; 
     for ( var i = 0; i < l; i++ ){
         this.clones[ i ].datapath.updateData( );

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzResizeReplicationManager.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzResizeReplicationManager.lzs	2008-04-02 21:18:03 UTC (rev 8529)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzResizeReplicationManager.lzs	2008-04-03 00:12:53 UTC (rev 8530)
@@ -79,11 +79,21 @@
 class LzResizeReplicationManager extends LzLazyReplicationManager {
 //need to destroy the original clone for resize in order to insert the 
 //appropriate setHeight call
-prototype.pooling = false; // Defined in LzReplicationManager
+
+var datasizevar;
+var __LZresizeupdating;
+
+// prototype.pooling = false; // Defined in LzReplicationManager
+
 /**
   * @access private
   */
-function construct ( odp , args ){
+function LzResizeReplicationManager ( odp , args, children:* = null, instcall:* = null ){
+    super(odp, args, children, instcall);
+}
+
+override function construct ( odp , args ){
+    this.pooling = false; // Defined in LzReplicationManager
     //Debug.write( 'making resize repl' );
 
     super.construct.apply(this, arguments);
@@ -95,10 +105,15 @@
 /**
   * @access private
   */
-function __LZsetCloneAttrs (){
+override function __LZsetCloneAttrs (){
+// FIXME [2008-02-11 pbr] How does this work in swf9
+if ($swf9) {
+    super.__LZsetCloneAttrs();
+} else {
     super.__LZsetCloneAttrs.apply(this, arguments);
     this.cloneAttrs.setHeight = LzResizeReplicationManager.__LZResizeSetSize;
 }
+}
 
 /**
   * @access private
@@ -136,7 +151,7 @@
   * (as opposed to, for example, when
   * the mask changes its height or item changes size
   */
-function __LZadjustVisibleClones(ln,nn){
+override function __LZadjustVisibleClones(ln,nn){
     //if the mask doesn't have a set size in the replication axis, don't affect
     //it
 
@@ -281,7 +296,7 @@
     var osize = cl.datapath.p[ this.datasizevar ] || this.viewsize;
     if ( s != osize ){
         cl.datapath.p[ this.datasizevar ] = s;
-        this.__LZadjustVisibleClones();
+        this.__LZadjustVisibleClones(null, null);
     }
 }
 
@@ -290,8 +305,9 @@
   * This is a funtion that is attached to each clone, which talks to the resize
   * replication manager 
   */
-LzResizeReplicationManager.__LZResizeSetSize = function ( h , k ){
-    super.setHeight( h );
+function __LZResizeSetSize ( h , k ){
+    // TODO [2008-02-11 pbr] setHeight is defined in a view, not a node
+    //super.setHeight( h );
     if ( k != true ){
         this.cloneManager.__LZHandleCloneResize( this , h);
     }
@@ -299,7 +315,7 @@
 
 /*
  * @access private
-function toString (){
+override function toString (){
     return "Resize clone manager in " + this.immediateparent;
 }
 */

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs	2008-04-02 21:18:03 UTC (rev 8529)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs	2008-04-03 00:12:53 UTC (rev 8530)
@@ -548,7 +548,8 @@
             if (trimwhitespace == true) {
                 nv = LzDataNode.trim(nv);
             }
-            lfcnode = {__proto__: LzDataText.prototype, data: nv, parentNode: lfcparent};
+            // FIXME: [2008-3-31 pbr] This bypasses initialization
+            lfcnode = {__proto__: LzDataText.prototype, data: nv, parentNode: lfcparent, nodeType: LzDataNode.TEXT_NODE};
         } else {
             // Do we need to copy attributes list as well?
             // After this works, try bashing the __proto__
@@ -588,7 +589,9 @@
                 }
             }
 
+            // FIXME: [2008-3-31 pbr] This bypasses initialization
             lfcnode = { __proto__: LzDataElement.prototype,
+                        nodeType: LzDataNode.ELEMENT_NODE,
                         nodeName: nodename,
                         attributes: cattrs,
                         ownerDocument: lfcparent.ownerDocument,



More information about the Laszlo-checkins mailing list