Index: LzNode.lzs
===================================================================
--- LzNode.lzs	(revision 1404)
+++ LzNode.lzs	(working copy)
@@ -1,5 +1,5 @@
 /******************************************************************************
- * LzNode.as 
+ * LzNode.lzs
  *****************************************************************************/
 
 //* A_LZ_COPYRIGHT_BEGIN ******************************************************
@@ -10,15 +10,15 @@
 //------------------------------------------------------------------------------
 
 //------------------------------------------------------------------------------
-LzNode = Class( "LzNode" , null ,
+class LzNode {
+
 //=============================================================================
 // @param LzNode parent: a node above this one in the hierarchy -- not
 // necessarily the immediate parent -- that will decide where this node goes
 // @param dictionary args: a dictionary of attributes used to initialize
 // this node
 //=============================================================================
-function LzNodeInitialize ( parent , attrs , children , instcall ){
-        #pragma 'methodName=initialize'
+function initialize ( parent , attrs , children , instcall ){
         super.initialize(parent, attrs, children, instcall);
         // Node node start
         if ($profile) {
@@ -159,14 +159,16 @@
                 this._profile_name = this.constructor.name;
             }
         }
-},
+}
 
 //------------------------------------------------------------------------------
 // Link up the getter/setter/defaultattr inheritance
 // @keywords private
 // @param Object prototype: the class prototype
 //------------------------------------------------------------------------------
-function LzNodeClassInitialize ( prototype ){
+// class initializer
+static function initialize (prototype) {
+
   // Ensure you have your own private dictionaries, not one
   // inherited from your superclass
   for (var hash in {setters: true, getters: true, defaultattrs: true, __LZdelayedSetters: true, earlySetters: true} ) {
@@ -174,34 +176,35 @@
       prototype[hash] = new LzInheritedHash(prototype[hash]);
     }
   }
+
 }
-                );
 
-DeclareEvent(LzNode.prototype, 'oninit' );
-DeclareEvent(LzNode.prototype, 'onconstruct' );
-DeclareEvent(LzNode.prototype, 'ondata' );
-DeclareEvent(LzNode.prototype, 'onclonenumber' );
-DeclareEvent(LzNode.prototype, 'ondestroy' );
+DeclareEvent(prototype, 'oninit' );
+DeclareEvent(prototype, 'onconstruct' );
+DeclareEvent(prototype, 'ondata' );
+DeclareEvent(prototype, 'onclonenumber' );
+DeclareEvent(prototype, 'ondestroy' );
 
-LzNode.prototype.__LZhandlers = null;
-LzNode.prototype.__LZlateinit = null;
-LzNode.prototype.__LZpreventSubInit = null;
-LzNode.prototype.__LZresolveDict = null;
-LzNode.prototype.__LZsourceLocation = null;
-LzNode.prototype.__LZUID = null;
+var __LZhandlers = null;
+var __LZlateinit = null;
+var __LZpreventSubInit = null;
+var __LZresolveDict = null;
+var __LZsourceLocation = null;
+var __LZUID = null;
 
-LzNode.prototype.defaultattrs = { $hasdefaultattrs : true };
-LzNode.prototype.isinited = false;
-LzNode.prototype.subnodes = null;
+var defaultattrs = { $hasdefaultattrs : true };
+var isinited = false;
+var subnodes = null;
 //@event ondata: Sent when the data selected by this node's datapath changes.
-LzNode.prototype.datapath = null;
+var datapath = null;
 
+
 //@field LzNode cloneManager: If this node is replicated due to data
 //replication, the LzReplicationManager which controls this node.
 
-LzNode.prototype.cloneManager = null;
-LzNode.prototype.name = null;
-LzNode.prototype.id = null;
+var cloneManager = null;
+var name = null;
+var id = null;
 //@field String defaultplacement: An attribute used in container classes. If
 //set to a non-null value, this forces this node to run its determinePlacement
 //method for any node whose parent is this node. If the subnode has its own
@@ -213,30 +216,15 @@
 //attribute will be set to one value before the subclass children are created
 //and to a different one after they are created. See the
 //determinePlacement method.
-LzNode.prototype.defaultplacement = null;
+var defaultplacement = null;
 
 // Initial values
-LzNode.prototype.$cfn = 0;
-LzNode.prototype.__LZdeleted = false;
-LzNode.prototype.immediateparent = null;
-LzNode.prototype.dependencies = null;
+var $cfn = 0;
+var __LZdeleted = false;
+var immediateparent = null;
+var dependencies = null;
 
-if ($debug) {
-    // The source locator table maps source locations to nodes
-    LzNode.sourceLocatorTable = {};
 
-    //---
-    // Translate a source locator to the corresponding node
-    // @param String sourceLocator: the locator to translate
-    // @return any: Either the corresponding LzNode or undefined if
-    // the source locator is unknown
-    //---
-    LzNode.lookupSourceLocator = function (sourceLocator) {
-        return this.sourceLocatorTable[sourceLocator];
-    }
-}
-
-
 //------------------------------------------------------------------------------
 // The construct() method of a node is called as early as possible --
 // before any arguments have been applied. This is the method to override in
@@ -284,7 +272,7 @@
 // to the instance. This contains any arguments that are default arguments
 // written in the class definition.
 //------------------------------------------------------------------------------
-LzNode.prototype.construct = function ( parent , args ){
+function construct ( parent , args ){
 
   //@field LzNode parent: Reference to the node that was passed as this
   // node's ancestor in the constructor.  If this node was created
@@ -359,14 +347,14 @@
 // TODO: [2006-05-24 ptw] Adam says this is a hack that we should get
 // rid of.
 //---
-LzNode.prototype.constructWithArgs = function ( parent , args ){};
+function constructWithArgs ( parent , args ){}
 
 //-----------------------------------------------------------------------------
 // Called at the same time that the node sends its oninit event -- usually
 // when the nodes siblings are instantiated, and always after the node's
 // children are instantiated.
 //-----------------------------------------------------------------------------
-LzNode.prototype.init = function ( ){
+function init ( ){
     // TODO: [2003-05-09 ptw] Move @field to schema attribute
 
     //this had to go here for the doc generator to recognize it
@@ -388,7 +376,7 @@
 //
 // @keywords protected
 //------------------------------------------------------------------------------
-LzNode.prototype.__LZinstantiationDone = function (){
+function __LZinstantiationDone (){
     if ( !this.immediateparent ||  this.immediateparent.isinited ||
          ( this.initstage == "early" ) ||
          ( this.__LZisnew && LzInstantiator.syncNew ) ){
@@ -400,14 +388,14 @@
 //------------------------------------------------------------------------------
 // @keywords private
 //------------------------------------------------------------------------------
-LzNode.prototype.__LZsetPreventInit = function ( ){
+function __LZsetPreventInit ( ){
     this.__LZpreventSubInit = [];
 }
 
 //------------------------------------------------------------------------------
 // @keywords private
 //------------------------------------------------------------------------------
-LzNode.prototype.__LZclearPreventInit = function ( ){
+function __LZclearPreventInit ( ){
     var lzp = this.__LZpreventSubInit;
     delete this.__LZpreventSubInit;
     for ( var i = 0; i < lzp.length; i++ ){
@@ -419,7 +407,7 @@
 // @keywords private
 // N.B.: LzCanvas replaces this method, so must be kept in sync
 //------------------------------------------------------------------------------
-LzNode.prototype.__LZcallInit = function ( ){
+function __LZcallInit ( ){
     if ( this.parent && this.parent.__LZpreventSubInit ){
         this.parent.__LZpreventSubInit.push( this );
         return;
@@ -482,7 +470,7 @@
 // initstage="late", and to force it to happen at all for nodes with
 // initstage="defer".
 //------------------------------------------------------------------------------
-LzNode.prototype.completeInstantiation = function (){
+function completeInstantiation (){
     if ( !this.isinited ){
         var myis = this.initstage;
 
@@ -500,13 +488,14 @@
 //@field Boolean ignoreAttribute: Setting an argument attribute to this value in the
 //construct routine of a subclass of LzNode will prevent further processing
 //of the attribute
-LzNode.prototype._ignoreAttribute = {toString: function () {
+var _ignoreAttribute = {toString: function () {
                                         return '_ignoreAttribute'}};
+
 //------------------------------------------------------------------------------
 // Applies a dictionary of args
 // @keywords private
 //------------------------------------------------------------------------------
-LzNode.prototype.__LZapplyArgs = function ( args , constcall ){
+function __LZapplyArgs ( args , constcall ){
       var oset = {};
       var hasset = [];
       var hasearly = null;
@@ -572,7 +561,7 @@
 // constructor of that child
 // c.children = an array of children for the new child
 //-----------------------------------------------------------------------------
-LzNode.prototype.createChildren = function ( carr  ){
+function createChildren ( carr  ){
 
     if ( this.__LZdeleted ) return;
 
@@ -603,7 +592,7 @@
 // @param String prop: a string specifying the key of attribute to return.
 // @return any: value of named property
 //-----------------------------------------------------------------------------
-LzNode.prototype.getAttribute = function(prop) {
+function getAttribute(prop) {
     if ( null == this.getters[ prop ] ){
         return this[ prop ];
     } else {
@@ -615,7 +604,7 @@
 //------------------------------------------------------------------------------
 // @keywords private
 //------------------------------------------------------------------------------
-LzNode.prototype.getProp = LzNode.prototype.getAttribute;
+prototype.getProp = getAttribute;
 
 //------------------------------------------------------------------------------
 // Sets the named attribute to the given value. If there is no setter for the
@@ -625,7 +614,7 @@
 // @param String prop: A string naming the key of attribute to set
 // @param any val: The value for that attribute
 //------------------------------------------------------------------------------
-LzNode.prototype.setAttribute = function(prop, val) {
+function setAttribute(prop, val) {
     //@field String name: The name for this subnode. If given, then this node's
     //parent and immediate parent will use store a pointer to this node as the
     //given name value
@@ -650,7 +639,7 @@
 //------------------------------------------------------------------------------
 // @keywords private
 //------------------------------------------------------------------------------
-LzNode.prototype.setProp = function ( prop , val ){
+function setProp ( prop , val ){
     if ( $debug ){
         Debug.warn( "setProp is deprecated. Use setAttribute instead." );
     }
@@ -660,7 +649,7 @@
 //------------------------------------------------------------------------------
 // @keywords private
 //------------------------------------------------------------------------------
-LzNode.prototype._setProp = LzNode.prototype.setProp;
+prototype._setProp = setProp;
 
 //-----------------------------------------------------------------------------
 // returns the expected value for the specified property, which is the value of
@@ -675,7 +664,7 @@
 //
 // @return: value of named property
 //-----------------------------------------------------------------------------
-LzNode.prototype.getExpectedAttribute = function(prop) {
+function getExpectedAttribute(prop) {
     var e_prop = "e_" + prop;
     if ( !this[ e_prop ] ) this[ e_prop ] = {}
     if ( this[e_prop].v == null ) return this[prop];
@@ -687,7 +676,7 @@
 // @param prop: A string naming the attribute to set
 // @param val: The value for that attribute
 //------------------------------------------------------------------------------
-LzNode.prototype.setExpectedAttribute = function(prop, val) {
+function setExpectedAttribute(prop, val) {
     var e_prop = "e_" + prop;
     if ( !this[e_prop] ) this[e_prop] = {}
     this[ e_prop ].v = val;
@@ -698,7 +687,7 @@
 // @param prop: A string naming the attribute to set
 // @param val: The value for that attribute
 //------------------------------------------------------------------------------
-LzNode.prototype.addToExpectedAttribute = function(prop, val) {
+function addToExpectedAttribute(prop, val) {
     var e_prop = "e_" + prop;
     if ( !this[e_prop] ) this[e_prop] = {}
     if ( this[e_prop].v == null ) this[e_prop].v = this[prop];
@@ -709,7 +698,7 @@
 // @keywords private
 // @param prop: A string naming the attribute to set
 //------------------------------------------------------------------------------
-LzNode.prototype.__LZincrementCounter = function(prop) {
+function __LZincrementCounter(prop) {
     var e_prop = "e_" + prop;
     var tep = this[e_prop];
     if (!tep) {
@@ -741,7 +730,7 @@
 // </ul>
 // @param async: If true, children of new node will be created asynchronously
 //-----------------------------------------------------------------------------
-LzNode.prototype.makeChild = function ( e , async ){
+function makeChild ( e , async ){
     //e.type = what this child is
     //e.name = subtype
     //e.attrs = init args
@@ -775,7 +764,7 @@
 }
 
 
-LzNode.prototype.setters ={
+var setters ={
     name : "setName" ,
     id : "setID" ,
     $events : "__LZsetEvents" ,
@@ -786,19 +775,19 @@
     $setters : -1,
     $classrootdepth : "__LZsetClassRoot",
     $datapath : "__LZmakeDatapath"
-}
+};
 
 /* this is for the doc generator:
-LzNode.prototype.setters.name = "setName"
-LzNode.prototype.setters.id = "setID"
-LzNode.prototype.setters.placement = -1
-LzNode.prototype.setters.datapath = "setDatapath"
+setters.name = "setName"
+setters.id = "setID"
+setters.placement = -1
+setters.datapath = "setDatapath"
 */
 
 //-----------------------------------------------------------------------------
 // @keywords private
 //-----------------------------------------------------------------------------
-LzNode.prototype.__LZsetClassRoot = function ( d ) {
+function __LZsetClassRoot ( d ) {
 
     if (!d) return;
 
@@ -820,7 +809,7 @@
 //-----------------------------------------------------------------------------
 // @keywords private
 //-----------------------------------------------------------------------------
-LzNode.prototype.__LZsetSetters = function ( o ) {
+function __LZsetSetters ( o ) {
     for ( var s in o ){
         var attrSet = "_anonSet" + s;
         this.__LZaddSetter( s , attrSet );
@@ -831,7 +820,7 @@
 //-----------------------------------------------------------------------------
 // @keywords private
 //-----------------------------------------------------------------------------
-LzNode.prototype.__LZaddSetter = function ( key , val ) {
+function __LZaddSetter ( key , val ) {
   // Ensure you have your own private setters dictionary, not one
   // inherited from your superclass
   if (! this.hasOwnProperty('setters')) {
@@ -850,7 +839,7 @@
 // @param String path: The xpath (relative to this node's datapath) to which to
 // bind the attribute.
 //-----------------------------------------------------------------------------
-LzNode.prototype.dataBindAttribute = function ( attr , path  ) {
+function dataBindAttribute ( attr , path  ) {
     if ( !this.datapath ){
         this.setDatapath( "." );
     }
@@ -862,27 +851,27 @@
     this.__LZdelegates.push ( new LzDataAttrBind( this.datapath, attr , path ));
 }
 
-LzNode.prototype.__LZdelayedSetters ={
+var __LZdelayedSetters ={
     $refs : "__LZresolveRefs" ,
     $delegates : "__LZsetDelegates"
-}
+};
 
-LzNode.prototype.earlySetters ={
+var earlySetters ={
     name            : true ,
     id              : true ,
     $events         : true ,
     $delegates      : true ,
     $classrootdepth : true ,
     $datapath       : true
-}
+};
 
-LzNode.prototype.getters ={};
+var getters ={};
 
 
 //-----------------------------------------------------------------------------
 // @keywords private
 //-----------------------------------------------------------------------------
-LzNode.prototype.__LZstoreDelegates = function ( delarr ){
+function __LZstoreDelegates ( delarr ){
     //delarr is a sequence of triplets of the form
     //... eventname, methodname, referenceFunction
 
@@ -910,7 +899,7 @@
 //------------------------------------------------------------------------------
 // @keywords private
 //------------------------------------------------------------------------------
-LzNode.prototype.__LZstoreRefs = function ( val , prop ){
+function __LZstoreRefs ( val , prop ){
     //Debug.write('__LZstoreRefs', this, prop, val);
     for ( var i in val){
         var ref = this[i];
@@ -926,7 +915,7 @@
 //------------------------------------------------------------------------------
 // @keywords private
 //------------------------------------------------------------------------------
-LzNode.prototype.__LZstoreAttr = function ( val , prop ){
+function __LZstoreAttr ( val , prop ){
     if ( this.__LZresolveDict == null ){
         this.__LZresolveDict = {};
     }
@@ -937,7 +926,7 @@
 //------------------------------------------------------------------------------
 // @keywords private
 //------------------------------------------------------------------------------
-LzNode.prototype.__LZresolveReferences = function (){
+function __LZresolveReferences (){
     var rdict = this.__LZresolveDict;
     this.__LZresolveDict = null;
     for ( var r in rdict ){
@@ -952,18 +941,18 @@
 // to this in hopes that it is not shadowed in the with contexts
 // because the compiler is not smart enough to use a register
 //------------------------------------------------------------------------------
-LzNode.prototype.__LZevalPathExpr = function ($lzsc$rp) {
+function __LZevalPathExpr ($lzsc$rp) {
     with (global){
         with( this ){
             return eval( $lzsc$rp );
         }
     }
-};
+}
 
 //------------------------------------------------------------------------------
 // @keywords private
 //------------------------------------------------------------------------------
-LzNode.prototype.__LZresolveRefs = function ( refs ){
+function __LZresolveRefs ( refs ){
     //need to resolve init= before constraints...
     for ( var p in refs ){
         var rp = refs[ p ];
@@ -1008,7 +997,7 @@
 //------------------------------------------------------------------------------
 // @keywords private
 //------------------------------------------------------------------------------
-LzNode.prototype.__LZsetDelegates = function ( delarr ){
+function __LZsetDelegates ( delarr ){
     if ( delarr.length && !this.__LZdelegates ){
         this.__LZdelegates = [];
     }
@@ -1034,7 +1023,7 @@
 // and my friend's width, the dependencies array would look like this:
 // [ this, "x" , myfriend, "width" ]
 //------------------------------------------------------------------------------
-LzNode.prototype.applyConstraint = function ( prop , cfunc, dep ){
+function applyConstraint ( prop , cfunc, dep ){
     if ( dep.length ){
         if ( !this.__LZdelegates ){
             this.__LZdelegates = [];
@@ -1071,7 +1060,7 @@
 // @keywords private
 // @param prop: The property with the constraint to release.
 //------------------------------------------------------------------------------
-LzNode.prototype.releaseConstraint =  function ( prop ){
+function releaseConstraint ( prop ){
 
     var refF = "_SetCons" + prop;
     this[ refF ].delegate.unregisterAll();
@@ -1082,7 +1071,7 @@
 // @keywords protected
 // @param String name: A string to use for the name of this node.
 //------------------------------------------------------------------------------
-LzNode.prototype.setName = function ( name ){
+function setName ( name ){
     if ((typeof(name) == 'string') && name.length) {
         if ($debug) {
             if (this.parent[name] && this.parent[name] !== this) {
@@ -1131,7 +1120,7 @@
 //------------------------------------------------------------------------------
 // @keywords private
 //------------------------------------------------------------------------------
-LzNode.prototype.defaultSet = function ( val ,prop ){
+function defaultSet ( val ,prop ){
     if ( val != null ){
         this[ prop ] = val ;
     }
@@ -1146,7 +1135,7 @@
 // @keywords protected
 // @param String id: The id to use for this node.
 //------------------------------------------------------------------------------
-LzNode.prototype.setID = function ( id ){
+function setID ( id ){
     //support for current system
     if ((typeof(id) == 'string') && id.length) {
         if ($debug) {
@@ -1178,7 +1167,7 @@
 // @keywords public
 // @param String dp: The string to use as the datapath.
 //------------------------------------------------------------------------------
-LzNode.prototype.setDatapath = function ( dp ) {
+function setDatapath ( dp ) {
     //@field LzDatapath datapath: A pointer to the LzDatapath attached to this node, if
     //there is one.
     if (null != this.datapath) {
@@ -1189,24 +1178,10 @@
 }
 
 
-// hack to create an 'abstract' method to hang the doc off of
-if ($debug) {
 //------------------------------------------------------------------------------
-// Called on any node that is declared with a datapath that matches a
-// terminal selector, such as <code>text()</code> or
-// <code>@<var>attribute</var></code> when the data it matches is
-// changed.
-// @keywords public
-// @param String data: a string representing the matching data
-//------------------------------------------------------------------------------
-LzNode.prototype.applyData = function ( data ){
-}
-}
-
-//------------------------------------------------------------------------------
 // @keywords private
 //------------------------------------------------------------------------------
-LzNode.prototype.__LZsetEvents = function ( eventHandlers ){
+function __LZsetEvents ( eventHandlers ){
     for (var e in eventHandlers ){
         this.__LZsetDefaultHandler( e , eventHandlers[ e ] );
     }
@@ -1214,7 +1189,7 @@
 //------------------------------------------------------------------------------
 // @keywords private
 //------------------------------------------------------------------------------
-LzNode.prototype.__LZsetDefaultHandler = function ( eName , func ){
+function __LZsetDefaultHandler ( eName , func ){
     var defHandleName = "_handle" + eName;
     this[ defHandleName ] = func;
     var d = new LzDelegate(this, defHandleName , this, eName  );
@@ -1229,7 +1204,7 @@
 // Slot that holds options.  Use getOption and setOption to access.
 // @keywords private
 //------------------------------------------------------------------------------
-LzNode.prototype.options = null
+var options = null;
 
 //------------------------------------------------------------------------------
 // Returns the value for an option (set with the options= attribute) for nodes
@@ -1239,7 +1214,7 @@
 // @return any: The value for that option (or undefined, if the option
 // has not been set)
 //------------------------------------------------------------------------------
-LzNode.prototype.getOption = function ( key ){
+function getOption ( key ){
     if ( ! this.options ) {
         // undefined
         return void 0;
@@ -1254,7 +1229,7 @@
 // @param String key: The option to retrieve
 // @param any val: The value for the option.
 //------------------------------------------------------------------------------
-LzNode.prototype.setOption = function ( key , val ){
+function setOption ( key , val ){
     if ( !this.options ) this.options = {};
     this.options[ key ] = val;
 }
@@ -1281,7 +1256,7 @@
 // @param dictionary args: The initialization args for the new subnode
 // @return LzNode : the node which will be the immediateparent of aSub
 //------------------------------------------------------------------------------
-LzNode.prototype.determinePlacement = function ( aSub , placement,
+function determinePlacement ( aSub , placement,
                                                          args) {
     // Note that if you modify this function, please check that
     // LzNode.prototype.construct (in this file) is in sync -- it
@@ -1302,7 +1277,7 @@
 // @param any val: The value of the attribute.
 // @return LzNode: The a pointer to subnode with the given property
 //------------------------------------------------------------------------------
-LzNode.prototype.searchImmediateSubnodes = function (prop, val) {
+function searchImmediateSubnodes (prop, val) {
     var s = this.subnodes;
     if (s == null) return null;
     for (var i = s.length-1; i >=0; i-- ){
@@ -1323,7 +1298,7 @@
 // @param any val: The value of the attribute.
 // @return LzNode: The a pointer to subnode with the given property
 //------------------------------------------------------------------------------
-LzNode.prototype.searchSubnodes = function ( prop , val) {
+function searchSubnodes ( prop , val) {
     var nextS = this.subnodes.concat();
 
     while ( nextS.length > 0  ){
@@ -1344,13 +1319,13 @@
 }
 
 
-LzNode.UIDs = 0;
+static var UIDs = 0;
 
 //-----------------------------------------------------------------------------
 // Returns the unique ID of the node.
 // @return String: A string representing a unique ID for the node.
 //-----------------------------------------------------------------------------
-LzNode.prototype.getUID = function (){
+function getUID (){
     if ( this.__LZUID == null ){
         this.__LZUID = "__U" + ++LzNode.UIDs;
     }
@@ -1367,7 +1342,7 @@
 // this one in the node hierarchy
 // @return Boolean: true if this node is a child of the given node.
 //------------------------------------------------------------------------------
-LzNode.prototype.childOf = function( node ){
+function childOf( node ){
     if (node == null) { return false; }
     var pv = this;
     //@field Number nodeLevel: The depth of this node in the overall node hierarchy
@@ -1384,7 +1359,7 @@
 // Deletes the node and all the subnodes.
 // @param Boolean recursiveCall: internal use only
 //------------------------------------------------------------------------------
-LzNode.prototype.destroy = function( recursiveCall ){
+function destroy( recursiveCall ){
     if (this.__LZdeleted == true) {
         return;
     }
@@ -1467,7 +1442,7 @@
 //------------------------------------------------------------------------------
 // @keywords private
 //------------------------------------------------------------------------------
-LzNode.prototype.deleteNode = function( recursiveCall ){
+function deleteNode( recursiveCall ){
     if ( $debug ){
         Debug.warn( "deleteNode is deprecated. Use destroy instead." );
     }
@@ -1497,7 +1472,7 @@
 // @return LzAnimator: a reference to the animator that was added
 //-----------------------------------------------------------------------------
 
-LzNode.prototype.animate = function( prop, to, duration, isRelative, moreargs ) {
+function animate( prop, to, duration, isRelative, moreargs ) {
 
     if ( duration == 0 ){
         var val = isRelative ? this[ prop ] + to : to;
@@ -1519,7 +1494,7 @@
 //------------------------------------------------------------------------------
 // @keywords private
 //------------------------------------------------------------------------------
-LzNode.prototype.toString = function (){
+function toString (){
     return this.classname + " "  + this.getDebugIdentification();
 }
 
@@ -1537,7 +1512,7 @@
 //
 // @keywords private
 //------------------------------------------------------------------------------
-LzNode.prototype._dbg_name = function (){
+function _dbg_name (){
   if ((typeof(this.id) == 'string') && 
       (global[this.id] === this)) {
     return "#" + this.id;
@@ -1558,7 +1533,7 @@
 //------------------------------------------------------------------------------
 // @keywords private
 //------------------------------------------------------------------------------
-LzNode.prototype.getDebugIdentification = function (){
+function getDebugIdentification (){
     var s = "";
     if ( this.name != null ){
         s += " name: " + this.name + " ";
@@ -1579,7 +1554,7 @@
 // @param depth: call with depth=1 (recursive function)
 // @keywords private
 //------------------------------------------------------------------------------
-LzNode.prototype.__LZassignClassRoot = function( arr , depth){
+function __LZassignClassRoot( arr , depth){
     if (arr != null) {
         for ( var i = 0; i < arr.length ; i++ ){
             arr[ i ].attrs.$classrootdepth = depth;
@@ -1598,7 +1573,7 @@
 //------------------------------------------------------------------------------
 // @keywords private
 //------------------------------------------------------------------------------
-LzNode.prototype.__LZmakeDatapath = function( dpobj ){
+function __LZmakeDatapath( dpobj ){
   if (! (dpobj instanceof Object)) {
     Debug.debug('__LZmakeDatapath on non-object %w?', dpobj)
   }
@@ -1609,10 +1584,46 @@
 //------------------------------------------------------------------------------
 // @keywords private
 //------------------------------------------------------------------------------
-LzNode.prototype.setClassEvents = function ( constructor ) {};
+function setClassEvents ( constructor ) {}
 
 //------------------------------------------------------------------------------
 // @keywords private
 //------------------------------------------------------------------------------
-LzNode.prototype.constructWithArgs = function ( parent , args ){};
+function constructWithArgs ( parent , args ){}
 
+} // End of LzNode
+
+
+
+
+// hack to create an 'abstract' method to hang the doc off of
+if ($debug) {
+//------------------------------------------------------------------------------
+// Called on any node that is declared with a datapath that matches a
+// terminal selector, such as <code>text()</code> or
+// <code>@<var>attribute</var></code> when the data it matches is
+// changed.
+// @keywords public
+// @param String data: a string representing the matching data
+//------------------------------------------------------------------------------
+function applyData ( data ){
+}
+}
+
+
+if ($debug) {
+    // The source locator table maps source locations to nodes
+    LzNode.sourceLocatorTable = {};
+
+    //---
+    // Translate a source locator to the corresponding node
+    // @param String sourceLocator: the locator to translate
+    // @return any: Either the corresponding LzNode or undefined if
+    // the source locator is unknown
+    //---
+    LzNode.lookupSourceLocator = function (sourceLocator) {
+        return this.sourceLocatorTable[sourceLocator];
+    }
+
+}
+
