[Laszlo-checkins] r10198 - openlaszlo/trunk/WEB-INF/lps/lfc/data
bargull@openlaszlo.org
bargull at openlaszlo.org
Thu Jul 3 14:43:23 PDT 2008
Author: bargull
Date: 2008-07-03 14:43:20 -0700 (Thu, 03 Jul 2008)
New Revision: 10198
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapointer.lzs
Log:
Change 20080703-bargull-4C3 by bargull at dell--p4--2-53 on 2008-07-03 00:33:37
in /home/Admin/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: debug-warnings for lazy-replication
New Features:
Bugs Fixed: LPP-6568
Technical Reviewer: hminsky
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Check "this.p" in __LZsimpleOperatorUpdate() before calling __LZprocessOperator(),
use datanode-API in getXPathIndex() to retrieve offset,
simplified code in __LZprocessOperator().
Tests:
see bugreport
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapointer.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapointer.lzs 2008-07-03 21:33:08 UTC (rev 10197)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapointer.lzs 2008-07-03 21:43:20 UTC (rev 10198)
@@ -547,7 +547,7 @@
/** @access private */
function __LZsimpleOperatorUpdate () :void {
- var ndat:* = this.__LZprocessOperator( this.p , this.parsedPath );
+ var ndat:* = this.p != null ? this.__LZprocessOperator( this.p, this.parsedPath ) : void(0);
//second clause is necessary to process updates for @*
var dchanged:Boolean = false;
if ( this.data != ndat || this.parsedPath.operator == "attributes" ){
@@ -904,8 +904,7 @@
* @return Number: The offset of the node
*/
function getXPathIndex ():Number {
- this.p.parentNode.__LZupdateCO();
- return this.p.__LZo + 1;
+ return this.p.getOffset() + 1;
}
/**
@@ -1214,32 +1213,18 @@
return p[ pp.operator ] ( pp.operatorArgs );
}
- // LzParsedPath.initialize() created pp.operator. If 'attributes',
- // don't use split(".") to separate the string because '.' is
- // a valid XML character.
- var parts:Array;
+ // LzParsedPath.initialize() created pp.operator
if (pp.operator.indexOf("attributes.") == 0) {
//operator: "attributes.xxx"
- parts = ['attributes', pp.operator.substr(11)]
+ if (p['attributes']) {
+ return p.attributes[pp.operator.substr(11)];
+ }
+ // TODO: [2007-3-16 hqm] I'll do what Ben did, return undefined
+ return;
} else {
//operator: "attributes", "nodeName"
- parts = [pp.operator];
+ return p[pp.operator];
}
-
- 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:int = 0; i < parts.length; i++) {
- var pathElt:String = parts[i];
-// 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 {
- val = val[pathElt];
- }
- }
- return val;
}
////////////////////////////////////////////////////////////////
More information about the Laszlo-checkins
mailing list