[Laszlo-checkins] r12106 - in openlaszlo/trunk: WEB-INF/lps/lfc/data WEB-INF/lps/lfc/kernel/dhtml WEB-INF/lps/lfc/kernel/svg WEB-INF/lps/lfc/kernel/swf WEB-INF/lps/lfc/kernel/swf9 test/lfc/data
bargull@openlaszlo.org
bargull at openlaszlo.org
Sun Dec 14 05:45:45 PST 2008
Author: bargull
Date: 2008-12-14 05:45:29 -0800 (Sun, 14 Dec 2008)
New Revision: 12106
Modified:
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/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/kernel/dhtml/LzXMLTranslator.js
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/svg/LzXMLTranslator.js
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzXMLLoader.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzXMLTranslator.as
openlaszlo/trunk/test/lfc/data/datadollarpath.lzx
openlaszlo/trunk/test/lfc/data/datanode.lzx
openlaszlo/trunk/test/lfc/data/datapath.lzx
openlaszlo/trunk/test/lfc/data/datapointerdependencies.lzx
openlaszlo/trunk/test/lfc/data/dollarpath.lzx
openlaszlo/trunk/test/lfc/data/repldone.lzx
openlaszlo/trunk/test/lfc/data/replup.lzx
Log:
Change 20081210-bargull-tl4 by bargull at dell--p4--2-53 on 2008-12-10 22:02:59
in /home/Admin/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: convert setters for LzDataNode/Element
New Features:
Bugs Fixed: LPP-7413
Technical Reviewer: hminsky
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
convert "setOwnerDocument", "setNodeName", "setChildNodes" and "setAttrs" to real setters, deprecate the old methods.
Tests:
smokecheck swf8/swf9/dhtml (note: ignoring the three known failures)
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataAttrBind.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataAttrBind.lzs 2008-12-14 11:14:54 UTC (rev 12105)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataAttrBind.lzs 2008-12-14 13:45:29 UTC (rev 12106)
@@ -113,7 +113,7 @@
} else if (ppdo == "__LZgetText") {
this.setNodeText( dat );
} else if (ppdo == "attributes") {
- this.p.setAttrs( dat );
+ this.p.$lzc$set_attributes( dat );
} else {
//remove the "attributes." from the operator
this.setNodeAttribute( ppdo.substring( 11 ) , dat );
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataElement.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataElement.lzs 2008-12-14 11:14:54 UTC (rev 12105)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataElement.lzs 2008-12-14 13:45:29 UTC (rev 12106)
@@ -18,19 +18,6 @@
// _if_ it were to have an initialize method, it would have to
// match LzNode.initialize's signature.
- /**
- * @devnote These are the setters that this mixin creates
- */
- /** @access private */
- function $lzc$set_attributes(v:Object) :void { this.setAttrs(v); }
- /** @access private */
- function $lzc$set_childNodes(v:Array) :void { this.setChildNodes(v); }
- /** @access private */
- function $lzc$set_nodeName(v:String) :void { this.setNodeName(v); }
- /** @access private */
- function $lzc$set_ownerDocument(v:*) :void { this.setOwnerDocument(v); }
-
-
/** @access private */
var __LZchangeQ :Array = null;
/** @access private */
@@ -79,7 +66,7 @@
this.childNodes.splice( off, 0, newChild );
}
- newChild.setOwnerDocument( this.ownerDocument );
+ newChild.$lzc$set_ownerDocument( this.ownerDocument );
newChild.parentNode = this;
if (newChild.onparentNode.ready) newChild.onparentNode.sendEvent( this );
if (this.onchildNodes.ready) this.onchildNodes.sendEvent( newChild );
@@ -124,13 +111,13 @@
if (! samenode) {
//TODO [20080702 anba] this breaks smoke-check!
// oldChild.parentNode = null;
- // oldChild.setOwnerDocument( null );
+ // oldChild.$lzc$set_ownerDocument( null );
//adjust node-offset
newChild.__LZo = off;
this.childNodes[ off ] = newChild;
}
- newChild.setOwnerDocument( this.ownerDocument );
+ newChild.$lzc$set_ownerDocument( this.ownerDocument );
newChild.parentNode = this;
if (newChild.onparentNode.ready) newChild.onparentNode.sendEvent( this );
if (this.onchildNodes.ready) this.onchildNodes.sendEvent( newChild );
@@ -154,7 +141,7 @@
if (off >= 0) {
//TODO [20080702 anba] this breaks smoke-check!
// oldChild.parentNode = null;
- // oldChild.setOwnerDocument( null );
+ // oldChild.$lzc$set_ownerDocument( null );
this.__LZcoDirty = true;
this.childNodes.splice( off, 1 );
@@ -199,7 +186,7 @@
//instead of marking dirty, this is easy
newChild.__LZo = this.childNodes.length - 1;
- newChild.setOwnerDocument( this.ownerDocument );
+ newChild.$lzc$set_ownerDocument( this.ownerDocument );
newChild.parentNode = this;
if (newChild.onparentNode.ready) newChild.onparentNode.sendEvent( this );
if (this.onchildNodes.ready) this.onchildNodes.sendEvent( newChild );
@@ -222,7 +209,7 @@
*/
override public function cloneNode ( deep:Boolean = false ) :LzDataNodeMixin {
var n:LzDataElement = new LzDataElement(this.nodeName);
- n.setAttrs( this.attributes );
+ n.$lzc$set_attributes( this.attributes );
if ( deep ){
for ( var i:int = 0 ; i < this.childNodes.length; i++ ){
n.appendChild( this.childNodes[ i ].cloneNode( true ) );
@@ -372,39 +359,41 @@
this.__LZcoDirty = false;
}
-
-/**
- * Sets the attributes of this node to the given Object.
- * @param Object attrs: The object to use as the attrs for this node.
- */
-public function setAttrs ( attrs:Object ) :void {
+/** @access private */
+function $lzc$set_attributes (attrs:Object) :void {
var a:Object = {};
- for ( var k:String in attrs ){ a[ k ] = attrs[ k ]; }
+ for (var k:String in attrs) { a[ k ] = attrs[ k ]; }
this.attributes = a;
- if (this.onattributes.ready) this.onattributes.sendEvent( 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 [LzDataNodeMixin] children: An array of LzDataNodeMixins to be the new children
- * of this node
+ * Sets the attributes of this node to the given Object.
+ * @param Object attrs: The object to use as the attributes for this node.
+ * @deprecated Use setAttribute('attributes', ...) instead.
*/
-public function setChildNodes ( children:Array ) :void {
+public final function setAttrs (attrs:Object) :void {
+ if ($debug) Debug.deprecated(this, arguments.callee, this.setAttribute);
+ this.$lzc$set_attributes(attrs);
+}
+
+/** @access private */
+function $lzc$set_childNodes (children:Array) :void {
//TODO [20080702 anba] this breaks smoke-check!
//var cn = this.childNodes;
//if (cn && cn.length > 0) {
// for (var i = 0; i < cn.length; ++i) {
// cn.parentNode = null;
- // cn.setOwnerDocument( null );
+ // cn.$lzc$set_ownerDocument( null );
// }
//}
-
+
this.childNodes = children;
-
+
if (children.length > 0) {
// special-case: we cannot call removeChild() if 'children' is the childNodes-Array
// of another LzDataElement, because removeChild() alters the childNodes-Array directly. Argh!
@@ -412,9 +401,9 @@
var otherParent = children[0].parentNode;
if (otherParent != null && otherParent !== this && otherParent.childNodes === children) {
notifyParent = false;
- otherParent.setChildNodes([]);
+ otherParent.$lzc$set_childNodes([]);
}
-
+
for (var i:int = 0; i < children.length; i++) {
var c = children[ i ];
if (c) {
@@ -423,27 +412,33 @@
c.parentNode.removeChild( c );
}
}
-
- c.setOwnerDocument( this.ownerDocument );
+
+ c.$lzc$set_ownerDocument( this.ownerDocument );
c.parentNode = this;
- if (c.onparentNode && c.onparentNode.ready) c.onparentNode.sendEvent( this );
+ 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 );
- }
+ 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
+ * Sets the children of this node to the given array.
+ * @param [LzDataNodeMixin] children: An array of LzDataNodeMixins to be the new children
+ * @deprecated Use setAttribute('childNodes', ...) instead.
+ * of this node
*/
-public function setNodeName ( name:String ) :void {
+public final function setChildNodes (children:Array) :void {
+ if ($debug) Debug.deprecated(this, arguments.callee, this.setAttribute);
+ this.$lzc$set_childNodes(children);
+}
+
+/** @access private */
+function $lzc$set_nodeName (name:String) :void {
this.nodeName = name;
//since this can affect xpaths, send onchildNodes event
if (this.onnodeName.ready) this.onnodeName.sendEvent( name );
@@ -456,6 +451,16 @@
}
/**
+ * Sets the name of this node.
+ * @param String name: The new name for this node
+ * @deprecated Use setAttribute('nodeName', ...) instead.
+ */
+public final function setNodeName (name:String) :void {
+ if ($debug) Debug.deprecated(this, arguments.callee, this.setAttribute);
+ this.$lzc$set_nodeName(name);
+}
+
+/**
* @access private
*/
function __LZgetText () :String {
@@ -603,7 +608,7 @@
var o:Object = {who: who, what: what, type: type};
if (cobj) o.cobj = cobj;
if ( this.__LZchangeQ ){
- this.__LZchangeQ.push ( o );
+ this.__LZchangeQ.push( o );
} else {
if (this.onDocumentChange.ready) this.onDocumentChange.sendEvent( o );
}
@@ -613,8 +618,7 @@
* @access private
*/
override function toString () /*:String*/ {
- var r:String = this.serialize();
- return r;
+ return this.serialize();
}
/**
@@ -633,13 +637,14 @@
* @access private
*/
public function __LZdoUnlock ( locker:LzDatapath ) :void {
-
+
if ( this.__LZlocker != locker ){
return;
}
var lzq:Array = this.__LZchangeQ;
this.__LZchangeQ = null;
+ this.__LZlocker = null;
if (lzq != null) {
for ( var i:int = 0; i < lzq.length; i++ ){
@@ -656,7 +661,7 @@
}
if ( sendit ){
- this.handleDocumentChange ( tc.what, tc.who, tc.type );
+ this.handleDocumentChange( tc.what, tc.who, tc.type );
}
}
}
@@ -675,8 +680,7 @@
* @see LzDataNodeMixin LzDataText LzDataPointer
* @access public
*/
-class LzDataElement extends LzDataNode with LzDataElementMixin, LzDataNodeMixin
-{
+class LzDataElement extends LzDataNode with LzDataElementMixin, LzDataNodeMixin {
/** DEFINE OBJECT: LzDataElement
* This object represents a hierarchical data node.
* @param String name: The name for this node.
@@ -686,17 +690,13 @@
function LzDataElement ( name:String, attributes:Object? = null, children:Array? = null) {
// N.B.: LzDataElement is not an LzNode so has a different
// initialize signature.
- super();
- this.nodeName = name;
- this.nodeType = LzDataElement.ELEMENT_NODE;
- this.attributes = attributes;
- this.ownerDocument = this;
- if (children == null) {
- this.setChildNodes ( [] );
- } else {
- this.setChildNodes( children );
- }
- }
+ super();
+ this.nodeName = name;
+ this.nodeType = LzDataElement.ELEMENT_NODE;
+ this.attributes = attributes;
+ this.ownerDocument = this;
+ this.$lzc$set_childNodes( children || [] );
+ }
/**
* Returns a list of empty nodes, each named 'name'.
@@ -716,8 +716,7 @@
* Get LzDataElement representation of primitive type, array, or object value.
*/
static function valueToElement ( o:* ) :LzDataElement {
- var n:LzDataElement = new LzDataElement("element", { }, LzDataElement.__LZv2E(o));
- return n;
+ return new LzDataElement("element", {}, LzDataElement.__LZv2E(o));
}
/**
@@ -728,7 +727,6 @@
static function __LZv2E ( o:* ) :Array {
var type:String = typeof( o );
- type.toLowerCase();
var c:Array = [];
if (type == "object") {
@@ -797,20 +795,17 @@
static function __LZXMLescape ( t:* ) :* {
if ( typeof( t ) != "string" ) return t;
+ const escChars:Object = LzDataElement.__LZescapechars;
var olen:int = t.length;
var r:String = "";
for ( var i:int = 0; i < olen; i++ ){
//handle newlines
var code:Number = t.charCodeAt( i );
if ( code < 32 ){
- r += "&#x" + lz.Utils.dectohex(code, 0) + ";";
+ r += "&#x" + code.toString(16) + ";";
} else {
var c:String = t.charAt( i );
- if ( LzDataElement.__LZescapechars[ c ] != null ){
- r += LzDataElement.__LZescapechars[ c ];
- } else {
- r += c;
- }
+ r += (escChars[c] || c);
}
}
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataNode.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataNode.lzs 2008-12-14 11:14:54 UTC (rev 12105)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataNode.lzs 2008-12-14 13:45:29 UTC (rev 12106)
@@ -181,29 +181,36 @@
* @param Boolean allowself: If true, this function returns true if the given
* node is the same as this node.
*/
-override function childOf ( el , allowself=false ) {
- return this.childOfNode (el, allowself);
+override function childOf ( el, allowself=false ) {
+ return this.childOfNode(el, allowself);
}
-/**
- * Sets the LzDataNodeMixin which is the ownerDocument for this node.
- * @param LzDataNodeMixin ownerDoc: The LzDataNodeMixin to act as the ownerDocument for
- * this node.
- */
-public function setOwnerDocument ( ownerDoc ) :void {
+/** @access private */
+function $lzc$set_ownerDocument (ownerDoc:LzDataElementMixin) :void {
this.ownerDocument = ownerDoc;
if (this.childNodes) {
- for ( var i:int = 0; i < this.childNodes.length; i++ ){
- this.childNodes[ i ].setOwnerDocument( ownerDoc );
+ for (var i:int = 0; i < this.childNodes.length; i++) {
+ this.childNodes[ i ].$lzc$set_ownerDocument( ownerDoc );
}
}
- if (this.onownerDocument && this.onownerDocument.ready) {
+ if (this.onownerDocument.ready) {
this.onownerDocument.sendEvent( ownerDoc );
}
}
/**
+ * Sets the LzDataNodeMixin which is the ownerDocument for this node.
+ * @param LzDataNodeMixin ownerDoc: The LzDataNodeMixin to act as the ownerDocument for
+ * this node.
+ * @deprecated Use setAttribute('ownerDocument', ...) instead.
+ */
+public final function setOwnerDocument (ownerDoc) :void {
+ if ($debug) Debug.deprecated(this, arguments.callee, this.setAttribute);
+ this.$lzc$set_ownerDocument(ownerDoc);
+}
+
+/**
* Returns a copy of this node.
* @param Boolean deep: If true, the children of this node will be part of the
* new node
@@ -239,6 +246,7 @@
/**
* @access private
+ * @see LzResizeReplicationManager
*/
function __LZgetSize (k:String) :* {
return this.__LZsize && this.__LZsize[k];
@@ -246,6 +254,7 @@
/**
* @access private
+ * @see LzResizeReplicationManager
*/
function __LZsetSize (k:String, v:*) :void {
if (! this.__LZsize) this.__LZsize = {};
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataText.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataText.lzs 2008-12-14 11:14:54 UTC (rev 12105)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataText.lzs 2008-12-14 13:45:29 UTC (rev 12106)
@@ -47,7 +47,7 @@
/** @access private */
function $lzc$set_data(newdata:String) :void {
this.data = newdata;
- if (this.ondata && this.ondata.ready) {
+ if (this.ondata.ready) {
this.ondata.sendEvent( newdata );
}
if (this.ownerDocument) {
@@ -89,7 +89,7 @@
/**
* @access private
*/
- override function toString () /*:String*/ {
+override function toString () /*:String*/ {
//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-12-14 11:14:54 UTC (rev 12105)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapath.lzs 2008-12-14 13:45:29 UTC (rev 12106)
@@ -543,7 +543,7 @@
} else if (ppdo == "__LZgetText") {
this.setNodeText( dat );
} else if (ppdo == "attributes") {
- this.p.setAttrs( dat );
+ this.p.$lzc$set_attributes( dat );
} else {
//remove the "attributes." from the operator
this.setNodeAttribute( ppdo.substring( 11 ) , dat );
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapointer.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapointer.lzs 2008-12-14 11:14:54 UTC (rev 12105)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapointer.lzs 2008-12-14 13:45:29 UTC (rev 12106)
@@ -956,7 +956,7 @@
return;
}
if (this.p.nodeType != LzDataElement.TEXT_NODE) {
- this.p.setNodeName( name );
+ this.p.$lzc$set_nodeName( name );
}
}
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs 2008-12-14 11:14:54 UTC (rev 12105)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs 2008-12-14 13:45:29 UTC (rev 12106)
@@ -438,7 +438,7 @@
* @access private
*/
override function destroy () {
- this.setChildNodes([ ]);
+ this.$lzc$set_childNodes([ ]);
this.dataRequest = null;
if (this.dsloadDel) {
@@ -519,9 +519,9 @@
if (data == null) {
return;
} else if (data instanceof Array) {
- this.setChildNodes(data);
+ this.$lzc$set_childNodes(data);
} else {
- this.setChildNodes([data]);
+ this.$lzc$set_childNodes([data]);
}
this.data = data;
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzXMLTranslator.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzXMLTranslator.js 2008-12-14 11:14:54 UTC (rev 12105)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzXMLTranslator.js 2008-12-14 13:45:29 UTC (rev 12106)
@@ -68,7 +68,7 @@
}
}
- lfcnode.setChildNodes(newchildren);
+ lfcnode.$lzc$set_childNodes(newchildren);
}
return lfcnode;
} else {
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/svg/LzXMLTranslator.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/svg/LzXMLTranslator.js 2008-12-14 11:14:54 UTC (rev 12105)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/svg/LzXMLTranslator.js 2008-12-14 13:45:29 UTC (rev 12106)
@@ -1,7 +1,7 @@
/**
* LzXMLTranslator.js
*
- * @copyright Copyright 2006 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2006-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @topic Kernel
@@ -75,7 +75,7 @@
}
}
- lfcnode.setChildNodes(newchildren);
+ lfcnode.$lzc$set_childNodes(newchildren);
return lfcnode;
} else {
// ignore all other node types
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzXMLLoader.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzXMLLoader.lzs 2008-12-14 11:14:54 UTC (rev 12105)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzXMLLoader.lzs 2008-12-14 13:45:29 UTC (rev 12106)
@@ -190,7 +190,7 @@
var lfcchild = LzXMLLoader.prototype.copyFlashXML(child, trimwhitespace, nsprefix);
newchildren[i] = lfcchild;
}
- lfcnode.setChildNodes(newchildren);
+ lfcnode.$lzc$set_childNodes(newchildren);
}
return lfcnode;
}
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzXMLTranslator.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzXMLTranslator.as 2008-12-14 11:14:54 UTC (rev 12105)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzXMLTranslator.as 2008-12-14 13:45:29 UTC (rev 12106)
@@ -116,7 +116,7 @@
var lfcchild:LzDataNodeMixin = copyFlashXML(child, trimwhitespace, nsprefix);
newchildren[i] = lfcchild;
}
- (lfcnode cast LzDataElement).setChildNodes(newchildren);
+ (lfcnode cast LzDataElement).$lzc$set_childNodes(newchildren);
}
return lfcnode;
}
Modified: openlaszlo/trunk/test/lfc/data/datadollarpath.lzx
===================================================================
--- openlaszlo/trunk/test/lfc/data/datadollarpath.lzx 2008-12-14 11:14:54 UTC (rev 12105)
+++ openlaszlo/trunk/test/lfc/data/datadollarpath.lzx 2008-12-14 13:45:29 UTC (rev 12106)
@@ -27,7 +27,7 @@
assertEquals( 'slop' , a.b.n.dattr );
dolpatbind.getFirstChild().setAttr( 'foo' , '11' );
- dolpatbind.getFirstChild().getFirstChild().setData( 'newdata' );
+ dolpatbind.getFirstChild().getFirstChild().setAttribute( "data", 'newdata' );
assertEquals( '11' , a.b.m.dattr );
assertEquals( 'newdata' , a.b.n.dattr );
Modified: openlaszlo/trunk/test/lfc/data/datanode.lzx
===================================================================
--- openlaszlo/trunk/test/lfc/data/datanode.lzx 2008-12-14 11:14:54 UTC (rev 12105)
+++ openlaszlo/trunk/test/lfc/data/datanode.lzx 2008-12-14 13:45:29 UTC (rev 12106)
@@ -69,11 +69,11 @@
zdat.removeChild( zdat.getLastChild() );
assertTrue(xmlstringequals( '<foo z="77" x="33"><aa/>some text<bb/>more text</foo>' , zdat.serialize() ));
- zdat.getFirstChild().setChildNodes( [ new LzDataElement( 'first' ),
+ zdat.getFirstChild().setAttribute( "childNodes", [ new LzDataElement( 'first' ),
new LzDataText( 'second' ) ] );
assertTrue(xmlstringequals( '<foo z="77" x="33"><aa><first/>second</aa>some text<bb/>more text</foo>' , zdat.serialize() ));
- zdat.setNodeName ( "myx" );
+ zdat.setAttribute( "nodeName", "myx" );
assertTrue(xmlstringequals('<myx z="77" x="33"><aa><first/>second</aa>some text<bb/>more text</myx>' , zdat.serialize() ));
Modified: openlaszlo/trunk/test/lfc/data/datapath.lzx
===================================================================
--- openlaszlo/trunk/test/lfc/data/datapath.lzx 2008-12-14 11:14:54 UTC (rev 12105)
+++ openlaszlo/trunk/test/lfc/data/datapath.lzx 2008-12-14 13:45:29 UTC (rev 12106)
@@ -82,7 +82,7 @@
assertFalse( etcRoot.etc1.datapath.setNodeName( 'data' ) );
assertEquals( 0 , this.collector.ondata.length );
- etcRoot.datapath.p.getFirstChild().setNodeName( 'data' );
+ etcRoot.datapath.p.getFirstChild().setAttribute( "nodeName", 'data' );
assertEquals( 6 , this.collector.ondata.length );
this.clearCollected();
@@ -130,11 +130,11 @@
assertEquals( 0 , this.collector.ondata.length );
assertEquals( 0 , this.collector.applyData.length );
- nn.setNodeName( 'blumb' );
+ nn.setAttribute( "nodeName", 'blumb' );
assertEquals( 0 , this.collector.ondata.length );
assertEquals( 0 , this.collector.applyData.length );
- nn.setNodeName( 'record' );
+ nn.setAttribute( "nodeName", 'record' );
assertEquals( 4 , this.collector.ondata.length );
assertEquals( 2 , this.collector.applyData.length );
assertEquals( et2.etc3 , this.collector.ondata[0] );
Modified: openlaszlo/trunk/test/lfc/data/datapointerdependencies.lzx
===================================================================
--- openlaszlo/trunk/test/lfc/data/datapointerdependencies.lzx 2008-12-14 11:14:54 UTC (rev 12105)
+++ openlaszlo/trunk/test/lfc/data/datapointerdependencies.lzx 2008-12-14 13:45:29 UTC (rev 12106)
@@ -54,7 +54,7 @@
assertEquals( "" , mydp.data );
var nt = ne.appendChild( new LzDataText( "end text" ) );
assertEquals( "end text" , mydp.data );
- nt.setData( "new end" );
+ nt.setAttribute( "data", "new end" );
assertEquals( "new end" , mydp.data );
var nnt = ne.insertBefore( new LzDataText( "first text" ) ,
ne.getFirstChild() );
Modified: openlaszlo/trunk/test/lfc/data/dollarpath.lzx
===================================================================
--- openlaszlo/trunk/test/lfc/data/dollarpath.lzx 2008-12-14 11:14:54 UTC (rev 12105)
+++ openlaszlo/trunk/test/lfc/data/dollarpath.lzx 2008-12-14 13:45:29 UTC (rev 12106)
@@ -106,9 +106,9 @@
<TestCase>
<method name="test1">
assertEquals( 6, replator.clones.length );
- somedat.getFirstChild().getFirstChild().setNodeName( 'plop' );
+ somedat.getFirstChild().getFirstChild().setAttribute( "nodeName", 'plop' );
assertEquals( 5, replator.clones.length );
- somedat.getFirstChild().getFirstChild().setNodeName( 'record' );
+ somedat.getFirstChild().getFirstChild().setAttribute( "nodeName", 'record' );
assertEquals( 6, replator.clones.length );
var opath = replator.xpath;
replator.setAttribute( 'datapath', opath + 'options/glasses/../..' );
Modified: openlaszlo/trunk/test/lfc/data/repldone.lzx
===================================================================
--- openlaszlo/trunk/test/lfc/data/repldone.lzx 2008-12-14 11:14:54 UTC (rev 12105)
+++ openlaszlo/trunk/test/lfc/data/repldone.lzx 2008-12-14 13:45:29 UTC (rev 12106)
@@ -46,7 +46,7 @@
<![CDATA[
for ( var i = 0; i < nodes.length ; i++ ){
var tnode = nodes[i].getFirstChild();
- tnode.setData( tnode.data + "x" );
+ tnode.setAttribute( "data", tnode.data + "x" );
}
]]>
</handler>
Modified: openlaszlo/trunk/test/lfc/data/replup.lzx
===================================================================
--- openlaszlo/trunk/test/lfc/data/replup.lzx 2008-12-14 11:14:54 UTC (rev 12105)
+++ openlaszlo/trunk/test/lfc/data/replup.lzx 2008-12-14 13:45:29 UTC (rev 12106)
@@ -17,7 +17,7 @@
<TestSuite>
<TestCase>
<method name="test1">
- items.getFirstChild().getFirstChild().setData( 'changed' );
+ items.getFirstChild().getFirstChild().setAttribute( "data", 'changed' );
items.getFirstChild().setAttr( "value" , "zero" );
Debug.write( items.serialize() );
assertEquals ( "changed" , rman.clones[ 0 ].getText() );
@@ -33,6 +33,6 @@
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
More information about the Laszlo-checkins
mailing list