[Laszlo-checkins] r7702 - in openlaszlo/trunk/WEB-INF/lps: lfc/compiler lfc/core lfc/data lfc/debugger lfc/events lfc/helpers lfc/kernel lfc/kernel/dhtml lfc/kernel/swf lfc/kernel/swf/dojo/flash6 lfc/kernel/swf/dojo/flash8 lfc/kernel/swf9 lfc/services lfc/views server/sc/src/org/openlaszlo/sc server/src/org/openlaszlo/sc

ptw@openlaszlo.org ptw at openlaszlo.org
Wed Jan 2 12:10:02 PST 2008


Author: ptw
Date: 2008-01-02 12:09:38 -0800 (Wed, 02 Jan 2008)
New Revision: 7702

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/compiler/Class.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzFormatter.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/core/LzDictionary.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/core/UserClass.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/LzDataRequest.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataText.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzParsedPath.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzMemory.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/events/LaszloEvents.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzFont.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/LzLibraryCleanup.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzContextMenu.js
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzContextMenu.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLibraryLoader.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzMediaLoader.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/dojo/flash6/DojoExternalInterface.as
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/dojo/flash8/DojoExternalInterface.as
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/dojo/flash8/ExpressInstall.as
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzContextMenu.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzHTTPLoader.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzLibraryLoader.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzLoadQueue.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzLoader.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMediaLoader.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSoundMC.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/services/LzIdle.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/services/LzInstantiator.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/services/LzTrack.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/views/LzScript.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/views/LzViewLinkage.lzs
   openlaszlo/trunk/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/CommonGenerator.java
Log:
Change 20071220-ptw-4 by ptw at dueling-banjos.local on 2007-12-20 16:36:26 EST
    in /Users/ptw/OpenLaszlo/ringding-2
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Use modern class constructor syntax

Bugs Fixed:
LPP-5307 'Our class constructor/initializer don't match JS2'

Technical Reviewer: dda at ddanderson.com (Message-Id: <347A6E41-4116-4AAE-BF9B-AFCE3377DA78 at ddanderson.com>)
QA Reviewer: max at laszlosystems.com (pending)

Details:
    CommonGenerator:  Output the initializer as a compiler function
    $lzsc$initizlize.  Translate super() calls to calls to
    super.$lzsc$initialize.

    Parser:  accept super() calls

    *: Rename initialize methods to the class name, use super() calls
     to invoke the superclass initializer.

Tests:
    smokecheck, sample apps



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/compiler/Class.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/compiler/Class.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/compiler/Class.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -1,7 +1,7 @@
 /***
  * Classes for Javascript with Mixins
  *
- * @copyright Copyright 2007 Laszlo Systems, Inc.  All Rights Reserved.
+ * @copyright Copyright 2007, 2008 Laszlo Systems, Inc.  All Rights Reserved.
  * Use is subject to license terms.
  *
  * @access private
@@ -26,7 +26,7 @@
   */
 var Instance = function constructor () {
   this.constructor = arguments.callee
-  this.initialize.apply(this, arguments);
+  this.$lzsc$initialize.apply(this, arguments);
 };
 Instance.prototype.constructor = Instance; 
 Instance.prototype.__initialized = false;
@@ -134,7 +134,7 @@
 });
 
 /**
-  * Instance initialize method
+  * Instance $lzsc$initialize method
   *
   * Called by Instance constructor as the last operation on a new
   * instance of a class.  Arguments are the arguments that were passed
@@ -149,7 +149,7 @@
   *
   * @devnote The call to the default method is optimized away in class constructors
   */
-Instance.prototype.addProperty('initialize', function initialize () {});
+Instance.prototype.addProperty('$lzsc$initialize', function $lzsc$initialize () {});
 
 /**
   * Class initialize method
@@ -285,9 +285,9 @@
         this.validateClassStructure();
       }
       // Call the initializer if it is not the default
-      if (this.initialize !== Instance.prototype.initialize) {
+      if (this.$lzsc$initialize !== Instance.prototype.$lzsc$initialize) {
         // Debug.debug('Initializing', this);
-        this.initialize.apply(this, arguments);
+        this.$lzsc$initialize.apply(this, arguments);
       }
     };
     nc.constructor = this;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzFormatter.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzFormatter.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzFormatter.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -3,7 +3,7 @@
 /**
  * Formatted output
  *
- * @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
@@ -21,7 +21,7 @@
   var message = '';
   var length = 0;
 
-  function initialize (message) {
+  function LzMessage (message) {
     if (arguments.length > 0) {
       this.appendInternal('' + message, message);
     }

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/core/LzDictionary.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/core/LzDictionary.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/core/LzDictionary.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -3,7 +3,7 @@
   *
   * Operations are containsKey, get, put, putAll
   *
-  * @copyright Copyright 2007 Laszlo Systems, Inc.  All Rights Reserved.
+  * @copyright Copyright 2007, 2008 Laszlo Systems, Inc.  All Rights Reserved.
   * Use is subject to license terms.
   *
   * @todo 2006-05-22 ptw Needs proper iteration support
@@ -16,7 +16,7 @@
   class LzDictionary extends Instance {
     // If object is supplied, the elements of object will be added to
     // the dictionary
-    function initialize (object) {
+    function LzDictionary (object) {
       // have to hold entries in an object not self or our methods
       // appear as keys
       this.entries = new Object;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -2,7 +2,7 @@
   * LzNode.lzs
   *
   *   *
-  * @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.
   *
   * @topic LZX
@@ -47,11 +47,11 @@
   * @param Boolean instcall
   * @access private
   */
-function initialize ( parent , attrs , children , instcall ){
+function LzNode ( parent , attrs , children , instcall ){
         this.__LZUID = "__U" + ++LzNode.__UIDs;
         this.__LZdeferDelegates = true;
         var qpos = LzDelegate.__LZdelegatesQueue.length;
-        super.initialize.apply(this, arguments);
+        super();
 
         // Node node start
         if ($profile) {

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/core/UserClass.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/core/UserClass.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/core/UserClass.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -2,7 +2,7 @@
   * UserClass.lzs 
   *
   * 
-  * @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.
   *
   * @topic LZX
@@ -74,10 +74,10 @@
   */
 static var tagname = 'class';
 
-function initialize (parent, args) {
+function LzUserClass (parent, args) {
   #pragma "warnUndefinedReferences=true"
   // TODO: [2006-05-19 ptw] The original did not do this, should we?
-  // super.initialize.apply(this, arguments);
+  // super(parent, args);
   var classobj = args.initobj;
   var classname = classobj.name;
   var attrs = classobj.attrs;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataAttrBind.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataAttrBind.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataAttrBind.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -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 private
@@ -11,7 +11,7 @@
 /** @access private */
 class LzDataAttrBind extends LzDatapointer {
 
-function initialize ( ndpath , attr, path ){
+function LzDataAttrBind ( ndpath , attr, path ){
                             this.setAttr = attr;
                             this.pathparent = ndpath;
                             this.node = ndpath.immediateparent;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataElement.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataElement.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataElement.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -1,5 +1,5 @@
 /**
-  * @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
@@ -639,8 +639,8 @@
 class LzDataElement extends LzMiniNode inherits LzDataElementTrait, LzDataNode {
     // N.B.: LzDataElement is not an LzNode so has a different
     // initialize signature.
-    function initialize ( name , attributes , children ) {
-            super.initialize.apply(this, arguments);
+    function LzDataElement ( name , attributes , children ) {
+            super(name, attributes, children);
             this.nodeName = name;
             this.attributes = attributes;
             this.ownerDocument = this;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataRequest.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataRequest.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataRequest.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -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
@@ -46,8 +46,8 @@
     /** @lzxtype event */
     var onstatus = LzDeclaredEvent;
 
-    function initialize (requestor) { 
-        super.initialize.apply(this, arguments);
+    function LzDataRequest (requestor) { 
+        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-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataText.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -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
@@ -21,8 +21,8 @@
 /**
   * @param String text: The text that this node holds.
   */
-function initialize ( text ){
-    super.initialize.apply(this, arguments);
+function LzDataText ( text ){
+    super();
     this.data = text;
 }
 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzParsedPath.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzParsedPath.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzParsedPath.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -1,401 +1,401 @@
-/**
-  *
-  * @copyright Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.
-  *            Use is subject to license terms.
-  *
-  * @access private
-  * @topic LFC
-  * @subtopic Data
-  */
-
-/**
-  * @access private
-  */
-class LzParsedPath {
-
-  /** 
-    * The xpath for this LzParsedPath
-    * 
-    * @access private
-    */
-  var path = null;
-  
-  /** 
-    * Array containing selector-operations for this LzParsedPath
-    * 
-    * @access private
-    */
-  var selectors = null;
-  
-  /** 
-    * Pointer to the dataset (if part of the path) otherwise null
-    * (currently only used for "new"-datasets, see deprecated message)
-    * 
-    * @access private
-    * @deprecated may lead to memory leaks (LPP-4214)
-    */
-  var context = null;
-  
-  /** 
-    * Name of the dataset (if part of the path)
-    * 
-    * @access private
-    */
-  var dsetname = null;
-  
-  /** 
-    * Name of the datasource (if part of the path)
-    * 
-    * @access private
-    */
-  var dsrcname = null;
-  
-  /** 
-    * Array containing the path to the local-dataset
-    * 
-    * @access private
-    */
-  var islocaldata = null;
-  
-  /* Parsing information */
-  
-  /** 
-    * One of: "nodeName", "__LZgetText", "serialize", "attributes" 
-    * or "attributes.xxx" with 'xxx' as an attribute-name
-    * 
-    * @access private
-    */
-  var operator = null;
-  
-  /** 
-    * One of: "position" or "last" 
-    * 
-    * @access private
-    */
-  var aggOperator = null;
-  
-  /** 
-    * null or 0
-    * 
-    * @access private
-    */
-  var operatorArgs = null;
-  
-  /** 
-    * true if terminal operator is a attribute-selector, otherwise false
-    * 
-    * @access private
-    */
-  var hasAttrOper = false;
-  
-  /** 
-    * true if path contains a attribute-predicate
-    * 
-    * @access private
-    */
-  var hasOpSelector = false;
-  
-  /** 
-    * true if path contains ".." or "//", otherwise false
-    * 
-    * @access private
-    */
-  var hasDotDot = false;
-  
-  /** 
-    * Return the context for this LzParsedPath
-    * Should be used instead of accessing directly the deprecated field context. 
-    *
-    * @access private
-    */
-  function getContext ( dp ) {
-      if (this.context != null) {
-          return this.context;
-      } else {
-          if (this.islocaldata != null) {
-              return dp.getLocalDataContext(this.islocaldata);
-          } else {
-              if (this.dsrcname != null) {
-                  return (canvas[ this.dsrcname ])[ this.dsetname ];
-              } else {
-                  if (this.dsetname != null) {
-                      return canvas.datasets[ this.dsetname ];
-                  }
-              }
-          }
-      }
-      return null;
-  }
-  
-  function initialize ( pa, node ){
-    //split context part
-    this.path = pa;
-    this.selectors = [];
-    var nowarn = false;
-
-    var sourceindex = pa.indexOf( ":/" );
-
-    //this.context = pointer to the dataset (if part of the path) otherwise null
-
-    if ( sourceindex > -1 ){
-        //we have a dset and possible dsource
-        var sourceparts = pa.substring( 0 , sourceindex ).split( ":" );
-        if ( sourceparts.length > 1 ){
-            var dsrc = LzParsedPath.trim( sourceparts[ 0 ] );
-            var dset = LzParsedPath.trim( sourceparts[ 1 ] );
-            if (dsrc == 'local') {
-                nowarn=true;
-                this.islocaldata = dset.split('.');
-            } else {
-                //we have a datasource and a dataset
-                nowarn = ((canvas[ dsrc ])[ dset ] != null);
-                this.dsrcname = dsrc;
-                this.dsetname = dset;
-            }
-        } else {
-            var name = LzParsedPath.trim( sourceparts[ 0 ] );
-            if ( name == "new" ){
-                //Debug.write( "setting to anondset" );
-                this.context = new AnonDatasetGenerator( this );
-        /*    } else if ( name == "localdata" ) {
-                this.context = node.getLocalDataContext();
-                Debug.write('found local dataset 2', this.context);
-                this.islocaldata = true; 
-        */
-            } else {
-                nowarn = (canvas.datasets[ name ] != null);
-                this.dsetname = name;
-            }
-        }
-        if (nowarn != true){
-            if ($debug) {
-                Debug.error( "couldn't find dataset for %w", pa );
-            }
-        }
-
-        var rest = pa.substring( sourceindex + 2 );
-    } else {
-        var rest = pa;
-    }
-
-    // Too simple - see lpp-737
-    // var nodes = rest.split( "/" );
-
-    var nodes = [];
-    var currnode = '';
-    var instring = false;
-    var escape = false;
-    for (var i = 0; i < rest.length; i++) {
-        var c = rest.charAt(i);
-        if (c == '\\' && escape == false) {
-            escape = true;
-            continue;
-        } else if (escape == true) {
-            escape = false;
-            currnode += c;
-            continue;
-        } else if (instring == false && c == "/") {
-            // only count slashes as new nodes if we're not inside a string 
-            // literal
-
-            nodes.push(currnode);
-            currnode = '';
-            continue;
-        } else if (c == "'") {
-            instring = instring ? false : true;   
-        }
-        currnode += c;
-    }
-    nodes.push(currnode);
-            
-
-    if (nodes != null) {
-        for ( var i = 0 ; i < nodes.length ; i++ ){
-            var cnode = LzParsedPath.trim( nodes[ i ] );
-
-            if ( i == nodes.length - 1 ){
-                //could be terminal operator...
-                if ( cnode.charAt( 0 ) == "@" ){
-                    //attribute
-                    this.hasAttrOper = true;
-                    if ( cnode.charAt(1) == "*" ){
-                        this.operator = "attributes";
-                    } else {
-                        this.operator = "attributes."  + 
-                            cnode.substring( 1, cnode.length );
-                    }
-                    continue;
-                } else if ( cnode.charAt( cnode.length -1 ) == ")" ){
-                    //name, text , serialize
-                    if ( cnode.indexOf( "last" ) > -1 ){
-                        this.aggOperator = "last";
-                    } else if ( cnode.indexOf( "position" ) > -1 ){
-                        this.aggOperator = "position";
-                    } else if ( cnode.indexOf( "name" ) > -1 ){
-                        this.operator = "nodeName";
-                    } else if ( cnode.indexOf( "text" ) > -1 ){
-                        this.operator = "__LZgetText";
-                        this.operatorArgs = 0;
-                    } else if ( cnode.indexOf( "serialize" ) > -1 ){
-                        this.operator = "serialize";
-                        this.operatorArgs = 0;
-                    } else {
-                        this.gotError( "Unknown operator: " + cnode );
-                    }
-                    continue;
-                } else if ( cnode == "" ){
-                    //this is a trailing slash -- it should be ignored
-                    continue;
-                }
-            }
-
-            //parse predicates
-            var preds = cnode.split( '[' );
-            var n = LzParsedPath.trim( preds[ 0 ] );
-            this.selectors.push ( n =="" ? "/" : n );
-
-            if ( n =="" || n==".." ){
-                this.hasDotDot = true;
-            }
-            if (preds != null) {
-                for ( var j = 1; j < preds.length ; j++ ){
-                    var pred = LzParsedPath.trim( preds[ j ] );
-                    pred = pred.substring( 0, pred.length-1);
-                    //Debug.write( 'predicate ' + pred );
-
-                    if ( LzParsedPath.trim ( pred ).charAt( 0 ) == '@'){
-                        //Debug.write( 'found predicate ' + pred ); 
-                        var attrpred = pred.split( '=' );
-                        var a;
-                        var tattr = attrpred[ 0 ].substring(1);
-
-                        if ( attrpred.length > 1 ){
-                            var aval = LzParsedPath.trim( attrpred[1] );
-                            aval = aval.substring( 1 , aval.length-1);
-                            a = { pred : 'attrval' ,
-                                  attr : LzParsedPath.trim( tattr ),
-                                  val :  LzParsedPath.trim( aval  )};
-                        } else {
-                            a = { pred : 'hasattr',
-                                  attr : LzParsedPath.trim( tattr )};
-                        }
-
-                        //Debug.write( a.pred , a.attr , a.val );
-                        this.selectors.push( a );
-                        this.hasOpSelector = true;
-                    } else {
-                        //we have an offset
-
-                        var a = pred.split("-");
-                        //Debug.write( 'offset ' + a );
-                        a[ 0 ] = LzParsedPath.trim( a[ 0 ] );
-
-
-                        if ( a[ 0 ] == "" ){
-                            a[ 0 ] = 1;
-                        }
-
-                        if ( a[ 1 ] != null ){
-                            a[ 1 ] = LzParsedPath.trim( a[ 1 ] );
-                        }
-
-                        if (  a[ 1 ] == "" ){
-                            a[ 1 ] = Infinity;
-                        } else if ( a.length == 1 ){
-                            a[ 1 ] = a [ 0 ];
-                        }
-
-                        a.pred = "range";
-                        this.selectors.push( a );
-                    } 
-                }
-            }
-        }
-    }
-        
-    //this.nodearray = an array of strings and offset pairs that represent the 
-    //slash-separated path for the datapath, with the dataset and operator 
-    //removed. The offset part of the pair can be:
-    //*null  if there is no offset given
-    //*int   if the offset is a single number
-    //*array if the offset is dash separated
-    
-    //this.operator = "t" , "n" , or "a" plus "." and the attribute name 
-    //text, name or attribute, respectively
-}
-
-/**
-  * @access private
-  */
-static function trim ( s ){
-    var st = 0;
-    var dotrim = false;
-    while( s.charAt( st ) == " " ){
-        st++;
-        dotrim = true;
-    }
-
-    var len = s.length - st;
-
-    while( s.charAt( st + len - 1 ) == " " ){
-        len--;
-        dotrim = true;
-    } 
-
-    return dotrim ? s.substr( st , len ) : s;
-}
-/**
-  * @access private
-  */
-function toString (  ){
-    return  "Parsed path for path: " + this.path;
-}
-
-/**
-  * @access private
-  */
-function debugWrite (  ){
-    if ($debug) {
-        Debug.write( this );
-        Debug.write( "  c:" + this.context + "|");
-        Debug.write( "  n:" + this.selectors.join('|') + "|");
-        Debug.write( "  d:" + this.operator + "|");
-        Debug.write( "  " );
-    }
-}
-
-} // End of LzParsedPath
-
-
-/**
-  * @access private
-  */
-class AnonDatasetGenerator {
-
-/**
-  * @access private
-  */
-function initialize  ( pp ){
-    this.pp = pp;
-}
-
-/**
-  * @access private
-  */
-function getContext (){
-    var d = new LzDataset( );
-    var dp = d.getPointer();
-    //start at 1 to skip '/'
-    if (this.pp.selectors != null) {
-        for ( var i = 0; i < this.pp.selectors.length; i++ ){
-            if ( this.pp.selectors[ i ] == "/" ) continue;
-            dp.addNode( this.pp.selectors[ i ] );
-            dp.selectChild();
-        }
-    }
-        
-    return d;
-}
-
-var noncontext = true;
-} // End of AnonDatasetGenerator
+/**
+  *
+  * @copyright Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.
+  *            Use is subject to license terms.
+  *
+  * @access private
+  * @topic LFC
+  * @subtopic Data
+  */
+
+/**
+  * @access private
+  */
+class LzParsedPath {
+
+  /** 
+    * The xpath for this LzParsedPath
+    * 
+    * @access private
+    */
+  var path = null;
+  
+  /** 
+    * Array containing selector-operations for this LzParsedPath
+    * 
+    * @access private
+    */
+  var selectors = null;
+  
+  /** 
+    * Pointer to the dataset (if part of the path) otherwise null
+    * (currently only used for "new"-datasets, see deprecated message)
+    * 
+    * @access private
+    * @deprecated may lead to memory leaks (LPP-4214)
+    */
+  var context = null;
+  
+  /** 
+    * Name of the dataset (if part of the path)
+    * 
+    * @access private
+    */
+  var dsetname = null;
+  
+  /** 
+    * Name of the datasource (if part of the path)
+    * 
+    * @access private
+    */
+  var dsrcname = null;
+  
+  /** 
+    * Array containing the path to the local-dataset
+    * 
+    * @access private
+    */
+  var islocaldata = null;
+  
+  /* Parsing information */
+  
+  /** 
+    * One of: "nodeName", "__LZgetText", "serialize", "attributes" 
+    * or "attributes.xxx" with 'xxx' as an attribute-name
+    * 
+    * @access private
+    */
+  var operator = null;
+  
+  /** 
+    * One of: "position" or "last" 
+    * 
+    * @access private
+    */
+  var aggOperator = null;
+  
+  /** 
+    * null or 0
+    * 
+    * @access private
+    */
+  var operatorArgs = null;
+  
+  /** 
+    * true if terminal operator is a attribute-selector, otherwise false
+    * 
+    * @access private
+    */
+  var hasAttrOper = false;
+  
+  /** 
+    * true if path contains a attribute-predicate
+    * 
+    * @access private
+    */
+  var hasOpSelector = false;
+  
+  /** 
+    * true if path contains ".." or "//", otherwise false
+    * 
+    * @access private
+    */
+  var hasDotDot = false;
+  
+  /** 
+    * Return the context for this LzParsedPath
+    * Should be used instead of accessing directly the deprecated field context. 
+    *
+    * @access private
+    */
+  function getContext ( dp ) {
+      if (this.context != null) {
+          return this.context;
+      } else {
+          if (this.islocaldata != null) {
+              return dp.getLocalDataContext(this.islocaldata);
+          } else {
+              if (this.dsrcname != null) {
+                  return (canvas[ this.dsrcname ])[ this.dsetname ];
+              } else {
+                  if (this.dsetname != null) {
+                      return canvas.datasets[ this.dsetname ];
+                  }
+              }
+          }
+      }
+      return null;
+  }
+  
+  function LzParsedPath ( pa, node ){
+    //split context part
+    this.path = pa;
+    this.selectors = [];
+    var nowarn = false;
+
+    var sourceindex = pa.indexOf( ":/" );
+
+    //this.context = pointer to the dataset (if part of the path) otherwise null
+
+    if ( sourceindex > -1 ){
+        //we have a dset and possible dsource
+        var sourceparts = pa.substring( 0 , sourceindex ).split( ":" );
+        if ( sourceparts.length > 1 ){
+            var dsrc = LzParsedPath.trim( sourceparts[ 0 ] );
+            var dset = LzParsedPath.trim( sourceparts[ 1 ] );
+            if (dsrc == 'local') {
+                nowarn=true;
+                this.islocaldata = dset.split('.');
+            } else {
+                //we have a datasource and a dataset
+                nowarn = ((canvas[ dsrc ])[ dset ] != null);
+                this.dsrcname = dsrc;
+                this.dsetname = dset;
+            }
+        } else {
+            var name = LzParsedPath.trim( sourceparts[ 0 ] );
+            if ( name == "new" ){
+                //Debug.write( "setting to anondset" );
+                this.context = new AnonDatasetGenerator( this );
+        /*    } else if ( name == "localdata" ) {
+                this.context = node.getLocalDataContext();
+                Debug.write('found local dataset 2', this.context);
+                this.islocaldata = true; 
+        */
+            } else {
+                nowarn = (canvas.datasets[ name ] != null);
+                this.dsetname = name;
+            }
+        }
+        if (nowarn != true){
+            if ($debug) {
+                Debug.error( "couldn't find dataset for %w", pa );
+            }
+        }
+
+        var rest = pa.substring( sourceindex + 2 );
+    } else {
+        var rest = pa;
+    }
+
+    // Too simple - see lpp-737
+    // var nodes = rest.split( "/" );
+
+    var nodes = [];
+    var currnode = '';
+    var instring = false;
+    var escape = false;
+    for (var i = 0; i < rest.length; i++) {
+        var c = rest.charAt(i);
+        if (c == '\\' && escape == false) {
+            escape = true;
+            continue;
+        } else if (escape == true) {
+            escape = false;
+            currnode += c;
+            continue;
+        } else if (instring == false && c == "/") {
+            // only count slashes as new nodes if we're not inside a string 
+            // literal
+
+            nodes.push(currnode);
+            currnode = '';
+            continue;
+        } else if (c == "'") {
+            instring = instring ? false : true;   
+        }
+        currnode += c;
+    }
+    nodes.push(currnode);
+            
+
+    if (nodes != null) {
+        for ( var i = 0 ; i < nodes.length ; i++ ){
+            var cnode = LzParsedPath.trim( nodes[ i ] );
+
+            if ( i == nodes.length - 1 ){
+                //could be terminal operator...
+                if ( cnode.charAt( 0 ) == "@" ){
+                    //attribute
+                    this.hasAttrOper = true;
+                    if ( cnode.charAt(1) == "*" ){
+                        this.operator = "attributes";
+                    } else {
+                        this.operator = "attributes."  + 
+                            cnode.substring( 1, cnode.length );
+                    }
+                    continue;
+                } else if ( cnode.charAt( cnode.length -1 ) == ")" ){
+                    //name, text , serialize
+                    if ( cnode.indexOf( "last" ) > -1 ){
+                        this.aggOperator = "last";
+                    } else if ( cnode.indexOf( "position" ) > -1 ){
+                        this.aggOperator = "position";
+                    } else if ( cnode.indexOf( "name" ) > -1 ){
+                        this.operator = "nodeName";
+                    } else if ( cnode.indexOf( "text" ) > -1 ){
+                        this.operator = "__LZgetText";
+                        this.operatorArgs = 0;
+                    } else if ( cnode.indexOf( "serialize" ) > -1 ){
+                        this.operator = "serialize";
+                        this.operatorArgs = 0;
+                    } else {
+                        this.gotError( "Unknown operator: " + cnode );
+                    }
+                    continue;
+                } else if ( cnode == "" ){
+                    //this is a trailing slash -- it should be ignored
+                    continue;
+                }
+            }
+
+            //parse predicates
+            var preds = cnode.split( '[' );
+            var n = LzParsedPath.trim( preds[ 0 ] );
+            this.selectors.push ( n =="" ? "/" : n );
+
+            if ( n =="" || n==".." ){
+                this.hasDotDot = true;
+            }
+            if (preds != null) {
+                for ( var j = 1; j < preds.length ; j++ ){
+                    var pred = LzParsedPath.trim( preds[ j ] );
+                    pred = pred.substring( 0, pred.length-1);
+                    //Debug.write( 'predicate ' + pred );
+
+                    if ( LzParsedPath.trim ( pred ).charAt( 0 ) == '@'){
+                        //Debug.write( 'found predicate ' + pred ); 
+                        var attrpred = pred.split( '=' );
+                        var a;
+                        var tattr = attrpred[ 0 ].substring(1);
+
+                        if ( attrpred.length > 1 ){
+                            var aval = LzParsedPath.trim( attrpred[1] );
+                            aval = aval.substring( 1 , aval.length-1);
+                            a = { pred : 'attrval' ,
+                                  attr : LzParsedPath.trim( tattr ),
+                                  val :  LzParsedPath.trim( aval  )};
+                        } else {
+                            a = { pred : 'hasattr',
+                                  attr : LzParsedPath.trim( tattr )};
+                        }
+
+                        //Debug.write( a.pred , a.attr , a.val );
+                        this.selectors.push( a );
+                        this.hasOpSelector = true;
+                    } else {
+                        //we have an offset
+
+                        var a = pred.split("-");
+                        //Debug.write( 'offset ' + a );
+                        a[ 0 ] = LzParsedPath.trim( a[ 0 ] );
+
+
+                        if ( a[ 0 ] == "" ){
+                            a[ 0 ] = 1;
+                        }
+
+                        if ( a[ 1 ] != null ){
+                            a[ 1 ] = LzParsedPath.trim( a[ 1 ] );
+                        }
+
+                        if (  a[ 1 ] == "" ){
+                            a[ 1 ] = Infinity;
+                        } else if ( a.length == 1 ){
+                            a[ 1 ] = a [ 0 ];
+                        }
+
+                        a.pred = "range";
+                        this.selectors.push( a );
+                    } 
+                }
+            }
+        }
+    }
+        
+    //this.nodearray = an array of strings and offset pairs that represent the 
+    //slash-separated path for the datapath, with the dataset and operator 
+    //removed. The offset part of the pair can be:
+    //*null  if there is no offset given
+    //*int   if the offset is a single number
+    //*array if the offset is dash separated
+    
+    //this.operator = "t" , "n" , or "a" plus "." and the attribute name 
+    //text, name or attribute, respectively
+}
+
+/**
+  * @access private
+  */
+static function trim ( s ){
+    var st = 0;
+    var dotrim = false;
+    while( s.charAt( st ) == " " ){
+        st++;
+        dotrim = true;
+    }
+
+    var len = s.length - st;
+
+    while( s.charAt( st + len - 1 ) == " " ){
+        len--;
+        dotrim = true;
+    } 
+
+    return dotrim ? s.substr( st , len ) : s;
+}
+/**
+  * @access private
+  */
+function toString (  ){
+    return  "Parsed path for path: " + this.path;
+}
+
+/**
+  * @access private
+  */
+function debugWrite (  ){
+    if ($debug) {
+        Debug.write( this );
+        Debug.write( "  c:" + this.context + "|");
+        Debug.write( "  n:" + this.selectors.join('|') + "|");
+        Debug.write( "  d:" + this.operator + "|");
+        Debug.write( "  " );
+    }
+}
+
+} // End of LzParsedPath
+
+
+/**
+  * @access private
+  */
+class AnonDatasetGenerator {
+
+/**
+  * @access private
+  */
+function AnonDatasetGenerator  ( pp ){
+    this.pp = pp;
+}
+
+/**
+  * @access private
+  */
+function getContext (){
+    var d = new LzDataset( );
+    var dp = d.getPointer();
+    //start at 1 to skip '/'
+    if (this.pp.selectors != null) {
+        for ( var i = 0; i < this.pp.selectors.length; i++ ){
+            if ( this.pp.selectors[ i ] == "/" ) continue;
+            dp.addNode( this.pp.selectors[ i ] );
+            dp.selectChild();
+        }
+    }
+        
+    return d;
+}
+
+var noncontext = true;
+} // End of AnonDatasetGenerator

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzMemory.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzMemory.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzMemory.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -2,7 +2,7 @@
 
 /**
   *
-  * @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 private
@@ -497,7 +497,8 @@
   var property = '';
   var leaked = 0;
 
-  function initialize (o) {
+  function __LzLeak (o) {
+    super();
     var annotations = Debug.annotation;
     var why = annotations.why;
     var leaked = annotations.leaked;
@@ -550,7 +551,8 @@
 
   var sort = Array.prototype.sort;
 
-  function initialize () {
+  function __LzLeaks () {
+    super();
     var l = Debug.leaks;
     var ll = l.length;
     var annotations = Debug.annotation;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/events/LaszloEvents.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/events/LaszloEvents.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/events/LaszloEvents.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -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.
   *
   * @affects lzevent lzdelegate
@@ -32,8 +32,8 @@
   * @param String eventName: Optional, but required if eventSender is used; The name
   * of the event to register the new delegate for.
   */  
-function initialize (context, functionName, eventSender, eventName) {
-  super.initialize.apply(this, arguments);
+function LzDelegate (context, functionName, eventSender, eventName) {
+  super();
   // too expensive to leave on all the time
 //     if ($debug) {
 //         this._dbg_created = Debug.backtrace();
@@ -355,8 +355,8 @@
   *  @param Object eventSender: The owner of this event
   *  @param String eventName: The name of this event.
   */
-function initialize ( eventSender , eventName , d ){
-    super.initialize.apply(this, arguments);
+function LzEvent ( eventSender , eventName , d ){
+    super();
 
     var _evs = eventSender._events;
     if (_evs == null ){

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzFont.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzFont.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzFont.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -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.
   *
   * @affects lzfont
@@ -362,8 +362,8 @@
   */
 var rsbtable;
 
-function initialize ( fontobject , attrs , style ){
-    super.initialize.apply(this, arguments);
+function LzFont ( fontobject , attrs , style ){
+    super();
     this.name = fontobject.name;
 
     this.style = style;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/LzLibraryCleanup.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/LzLibraryCleanup.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/LzLibraryCleanup.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -1,7 +1,7 @@
 /**
   * LzLibraryCleanup.as
   *
-  * @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.
   *
   * @topic Kernel
@@ -19,9 +19,9 @@
     static var tagname = '__libraryloadercomplete';
 
 
-    function initialize ( owner , args ) {
+    function LzLibraryCleanup ( owner , args ) {
         //this.callInherited( "constructor", arguments.callee ,owner ,args );
-        super.initialize.apply(this, arguments);
+        super(owner, args);
         var lib = LzLibrary.findLibrary(args.libname);
         lib.loading = false;
         if (lib.onload.ready) lib.onload.sendEvent(true);

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzContextMenu.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzContextMenu.js	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzContextMenu.js	2008-01-02 20:09:38 UTC (rev 7702)
@@ -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
@@ -19,7 +19,7 @@
   */
 class LzContextMenu extends LzNode {
 
-function initialize(del) {
+function LzContextMenu (del) {
     // set callback for "oncontextmenu" event
     this.__LZmousedowndel = new LzDelegate( this , "__hide");
     this.items = [];
@@ -165,7 +165,7 @@
   */
 class LzContextMenuItem extends LzNode {
 
-function initialize (title, del) {
+function LzContextMenuItem (title, del) {
     this.cmenuitem = {visible: true, enabled: true, separatorBefore: false, caption: title};
     this.setDelegate(del);
 }; // End of LzContextMenuItem

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzContextMenu.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzContextMenu.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzContextMenu.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -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
@@ -19,7 +19,7 @@
   */
 class LzContextMenu extends LzNode {
 
-function initialize(del) {
+function LzContextMenu (del) {
                                // set callback for Flash "onSelect" event
                                this.cm = new ContextMenu();
                                this.cm.hideBuiltInItems();
@@ -121,7 +121,7 @@
   */
 class LzContextMenuItem extends LzNode {
 
-function initialize (title, del) {
+function LzContextMenuItem (title, del) {
     this.cmenuitem = new ContextMenuItem(title);
     this.setDelegate(del);
 }; // End of LzContextMenuItem

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLibraryLoader.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLibraryLoader.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLibraryLoader.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -1,7 +1,7 @@
 /**
   * LzLibraryLoader.as
   *
-  * @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.
   *
   * @topic Kernel
@@ -14,8 +14,8 @@
 //* A_LZ_COPYRIGHT_END ********************************************************
 
 class LzLibraryLoader extends LzLoader {
-    function initialize ( owner , args ) {
-        super.initialize.apply(this, arguments);
+    function LzLibraryLoader ( owner , args ) {
+        super(owner, args);
         this.owner.loadperc = 0;
         //setup loadmovie stuff that never changes
         this.mc.loader = this;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -1,7 +1,7 @@
 /**
   * LzLoader.as
   *
-  * @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.
   *
   * @topic Kernel
@@ -13,8 +13,8 @@
   */
 class LzLoader {
 
-function initialize ( owner , args ){
-    super.initialize.apply(this, arguments);
+function LzLoader ( owner , args ){
+    super(owner, args);
     //Debug.write("LzLoader initialize owner=",owner,'attachref=', args.attachRef, args);
     this.mc = args.attachRef == null ? owner.__LZmovieClipRef : args.attachRef;
     //this breaks media loading in swf: this.mc = args.attachRef == null ? owner.getMCRef() : args.attachRef;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzMediaLoader.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzMediaLoader.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzMediaLoader.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -1,7 +1,7 @@
 /**
   * LzMediaLoader.as
   *
-  * @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.
   *
   * @topic Kernel
@@ -12,8 +12,8 @@
   * @access private
   */
 class LzMediaLoader extends LzLoader {
-    function initialize( owner , args ) {
-        super.initialize.apply(this, arguments);
+    function LzMediaLoader ( owner , args ) {
+        super(owner, args);
 
         this.owner.owner.loadperc = 0;
 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/dojo/flash6/DojoExternalInterface.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/dojo/flash6/DojoExternalInterface.as	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/dojo/flash6/DojoExternalInterface.as	2008-01-02 20:09:38 UTC (rev 7702)
@@ -11,7 +11,7 @@
 	var _fscommandReady = false;
 	var _callbacks = [];
 
-	function initialize(){ 
+	function DojoExternalInterfaceClass(){ 
 		//getURL("javascript:alert('FLASH:DojoExternalInterface initialize')");
 		//Debug.write('DojoExternalInterface.initialize()');
 		// FIXME: Set available variable by testing for capabilities
@@ -220,7 +220,7 @@
 }
 
 /* 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 ******************************************************/
 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/dojo/flash8/DojoExternalInterface.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/dojo/flash8/DojoExternalInterface.as	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/dojo/flash8/DojoExternalInterface.as	2008-01-02 20:09:38 UTC (rev 7702)
@@ -23,7 +23,7 @@
 	var argData = null;
 	var resultData = null;
 	
-	function initialize(){
+	function DojoExternalInterfaceClass(){
 		// extract the dojo base path
 		//Debug.write('initialize', flash.external.ExternalInterface.addCallback);
 		
@@ -227,7 +227,7 @@
 }
 
 /* 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 ******************************************************/
 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/dojo/flash8/ExpressInstall.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/dojo/flash8/ExpressInstall.as	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/dojo/flash8/ExpressInstall.as	2008-01-02 20:09:38 UTC (rev 7702)
@@ -23,7 +23,7 @@
 	var updater = null
 	var hold = null
 	
-    function initialize(){
+    function ExpressInstall(){
 		// does the user need to update?
 		this.needsUpdate = (_root.MMplayerType == undefined) ? false : true;	
     }
@@ -75,6 +75,6 @@
 }
 
 /* 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 ******************************************************/

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzContextMenu.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzContextMenu.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzContextMenu.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -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
@@ -19,7 +19,7 @@
   */
 class LzContextMenu extends LzNode {
 
-function initialize(del) {
+function LzContextMenu (del) {
                                // set callback for Flash "onSelect" event
                                this.cm = new ContextMenu();
                                this.cm.hideBuiltInItems();
@@ -121,7 +121,7 @@
   */
 class LzContextMenuItem extends LzNode {
 
-function initialize (title, del) {
+function LzContextMenuItem (title, del) {
     this.cmenuitem = new ContextMenuItem(title);
     this.setDelegate(del);
 }; // End of LzContextMenuItem

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzHTTPLoader.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzHTTPLoader.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzHTTPLoader.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -1,7 +1,7 @@
 /**
   * LzHTTPLoader.lzs
   *
-  * @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.
   *
   * @topic Kernel
@@ -15,7 +15,7 @@
 // We have an internal 'lzloader' property which points to an LzLoader (Flash-7-8-specific)
 class LzHTTPLoader {
 
-function initialize (owner, proxied) {
+function LzHTTPLoader (owner, proxied) {
     this.lzloader = this.makeLzLoader(proxied);
     this.owner = owner;
     this.options = {

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -1,7 +1,7 @@
 /**
   * LzInputTextSprite.lzs
   *
-  * @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.
   *
   * @topic Kernel
@@ -14,11 +14,11 @@
   */
 class LzInputTextSprite extends LzTextSprite {
 
-function initialize(newowner, args) {
+function LzInputTextSprite (newowner, args) {
     // [todo pbr 10-31-07]
-    // I'm not calling super.initialize because this appears to do what
+    // I'm not calling super because this appears to do what
     // LzInputSprite ctor does 
-    // super.initialize.apply(this, arguments);
+    // super(newowner, args);
 
     this.__LZdepth = newowner.immediateparent.sprite.__LZsvdepth++;
     this.__LZsvdepth = 0;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzLibraryLoader.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzLibraryLoader.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzLibraryLoader.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -1,7 +1,7 @@
 /**
   * LzLibraryLoader.as
   *
-  * @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.
   *
   * @topic Kernel
@@ -14,8 +14,8 @@
 //* A_LZ_COPYRIGHT_END ********************************************************
 
 class LzLibraryLoader extends LzLoader {
-    function initialize ( owner , args ) {
-        super.initialize.apply(this, arguments);
+    function LzLibraryLoader ( owner , args ) {
+        super(owner, args);
         this.owner.loadperc = 0;
         //setup loadmovie stuff that never changes
         this.mc.loader = this;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzLoadQueue.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzLoadQueue.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzLoadQueue.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -1,7 +1,7 @@
 /**
   * LzLoadQueue.lzs
   *
-  * @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.
   *
   * @topic Kernel
@@ -14,7 +14,7 @@
   */
 class LzLoadQueueClass {
 
-function initialize () {
+function LzLoadQueueClass () {
     this.addPriorityFunction( LzLoadQueueClass.defaultPriorityAssignment );
     this.timeoutDel = new LzDelegate( this , "checkTimeout" );
 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzLoader.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzLoader.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzLoader.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -1,7 +1,7 @@
 /**
   * LzLoader.as
   *
-  * @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.
   *
   * @topic Kernel
@@ -13,8 +13,8 @@
   */
 class LzLoader {
 
-function initialize ( owner , args ){
-    super.initialize.apply(this, arguments);
+function LzLoader ( owner , args ){
+    super(owner, args);
     //Debug.write("LzLoader initialize owner=",owner,'attachref=', args.attachRef, args);
     this.mc = args.attachRef == null ? owner.__LZmovieClipRef : args.attachRef;
     //this breaks media loading in swf: this.mc = args.attachRef == null ? owner.getMCRef() : args.attachRef;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMediaLoader.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMediaLoader.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMediaLoader.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -1,7 +1,7 @@
 /**
   * LzMediaLoader.as
   *
-  * @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.
   *
   * @topic Kernel
@@ -12,8 +12,8 @@
   * @access private
   */
 class LzMediaLoader extends LzLoader {
-    function initialize( owner , args ) {
-        super.initialize.apply(this, arguments);
+    function LzMediaLoader ( owner , args ) {
+        super(owner, args);
 
         this.owner.owner.loadperc = 0;
 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSoundMC.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSoundMC.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSoundMC.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -1,7 +1,7 @@
 /**
   * LzSoundMC.as
   *
-  * @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.
   *
   * @topic Kernel
@@ -16,7 +16,7 @@
   */
 class LzSoundMC {
 
-function initialize (mc) {
+function LzSoundMC (mc) {
     this.init(mc);
     this._playdel = new LzDelegate( this , "testPlay" );
 }

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -1,7 +1,7 @@
 /**
   * LzSprite.lzs
   *
-  * @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.
   *
   * @topic Kernel
@@ -10,8 +10,8 @@
 
 class LzSprite {
 
-function initialize(newowner, isroot, args) {
-    super.initialize.apply(this, arguments);
+function LzSprite (newowner, isroot, args) {
+    super();
     if (newowner == null) return this;
     this.owner = newowner;
     //Debug.write('---> New sprite', newowner, newowner.immediateparent, newowner.immediateparent.sprite);

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -1,7 +1,7 @@
 /**
   * LzTextSprite.lzs
   *
-  * @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.
   *
   * @topic Kernel
@@ -10,11 +10,11 @@
 
 class LzTextSprite extends LzSprite {
 
-function initialize(newowner, args) {
+function LzTextSprite (newowner, args) {
     // [todo pbr 10-31-07]
-    // I'm not calling super.initialize because this appears to do what
+    // I'm not calling super because this appears to do what
     // LzInputSprite ctor does 
-    // super.initialize.apply(this, arguments);
+    // super(newowner, args);
 
     if (newowner == null) return this;
     this.__LZdepth = newowner.immediateparent.sprite.__LZsvdepth++;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/services/LzIdle.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/services/LzIdle.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/services/LzIdle.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -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.
   *
   * @affects lzidle
@@ -38,7 +38,7 @@
 
 
 var removeCOI = null;
-function initialize () {
+function LzIdleClass () {
   // Create array on instance, not prototype
   this.coi = new Array;
   this.removeCOI = new LzDelegate( this , "removeCallIdleDelegates" );

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/services/LzInstantiator.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/services/LzInstantiator.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/services/LzInstantiator.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -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.
   *
   * @affects lzinstantiator
@@ -19,7 +19,7 @@
 class LzInstantiatorClass {
 
 var checkQDel = null;
-function initialize () {
+function LzInstantiatorClass () {
   this.checkQDel = new LzDelegate( this , "checkQ" );
 }
 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/services/LzTrack.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/services/LzTrack.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/services/LzTrack.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -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.
   *
   * @affects lztrack
@@ -122,8 +122,8 @@
 /** @access private */
 var __LZmouseupDel = null;
 
-function initialize (){
-    super.initialize.apply(this, arguments);
+function LzTrackClass (){
+    super();
 
     this.__LZtrackDel = new LzDelegate( this, "__LZtrack" );// called on idle
     this.__LZmouseupDel = new LzDelegate( this, "__LZmouseup", LzGlobalMouse, 'onmouseup');// called on global mouseup

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -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.
   *
   * @affects lzcanvas
@@ -61,9 +61,9 @@
   */
 static var tagname = 'canvas';
 
-function initialize ( args ) {
+function LzCanvas ( args ) {
     // TODO: [2006-05-19 ptw] The original did not do this, should we?
-    // super.initialize.apply(this, arguments);
+    // super(null, args);
     // Note canvas start
     if ($profile) {
         Profiler.event('start: #canvas');

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/views/LzScript.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/views/LzScript.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/views/LzScript.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -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
@@ -68,8 +68,8 @@
   */
 static var tagname = 'script';
 
-function initialize ( parent, args ) {
-    super.initialize.apply(this, arguments);
+function LzScript ( parent, args ) {
+    super(parent, args);
     args.script();
 }
 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/views/LzViewLinkage.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/views/LzViewLinkage.lzs	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/views/LzViewLinkage.lzs	2008-01-02 20:09:38 UTC (rev 7702)
@@ -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
@@ -38,7 +38,7 @@
   * @param fromView: the view from which to originate the transformation
   * @param toView: the reference view
   */
-  function initialize ( fromView, toView ) {
+  function LzViewLinkage ( fromView, toView ) {
     //@field scale: An <b><i>LzPoint</b></i> representing the scale
     //transformation of this linkage. 1 is no transformation.
     this.scale = new Object ();

Modified: openlaszlo/trunk/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt	2008-01-02 20:09:38 UTC (rev 7702)
@@ -1,7 +1,7 @@
 /* ****************************************************************************
  * Parser.jjt
  *
- * Copyright (c) 2002-2007 Laszlo Systems, Inc.
+ * Copyright (c) 2002-2008 Laszlo Systems, Inc.
  * All Rights Reserved.
  *
  * This software is the proprietary information of Laszlo Systems, Inc.
@@ -463,7 +463,9 @@
 
 void SuperCallExpression() #SuperCallExpression : {}
 {
-  "super" "." Identifier()
+  "super" ([ LOOKAHEAD("." Identifier() ("." | "("))
+            "." Identifier()
+           ] #EmptyExpression(jjtree.nodeArity()==0))
           ([ LOOKAHEAD("." Identifier(), { "apply".equals(getToken(2).image) || "call".equals(getToken(2).image) })
             "." Identifier()
            ] #EmptyExpression(jjtree.nodeArity()==0))

Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/CommonGenerator.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/CommonGenerator.java	2008-01-02 18:38:23 UTC (rev 7701)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/CommonGenerator.java	2008-01-02 20:09:38 UTC (rev 7702)
@@ -407,7 +407,13 @@
         if (n instanceof ASTFunctionDeclaration) {
           SimpleNode[] c = n.getChildren();
           assert c.length == 3;
-          p.add(new ASTLiteral(((ASTIdentifier)c[0]).getName()));
+          String fname = ((ASTIdentifier)c[0]).getName();
+          // Transform constructor into '$lzsc$initialize' method
+          if (classnameString.equals(fname)) {
+            fname = "$lzsc$initialize";
+            c[0] = new ASTIdentifier(fname);
+          }
+          p.add(new ASTLiteral(fname));
           SimpleNode funexpr = new ASTFunctionExpression(0);
           funexpr.setBeginLocation(n.filename, n.beginLine, n.beginColumn);
           funexpr.setChildren(c);
@@ -697,7 +703,10 @@
     String ca = null;
     String pattern = "(arguments.callee.superclass?arguments.callee.superclass.prototype[_1]:this.nextMethod(arguments.callee, _1)).call(this, _2)";
     if (fname instanceof ASTEmptyExpression) {
-      name = "constructor";
+      // super with no selector is the constructor, which will be
+      // renamed to $lzsc$initialize in translateClassDirective to
+      // mesh with lfc/compiler/Class.lzs framework
+      name = "$lzsc$initialize";
     } else {
       name = ((ASTIdentifier)fname).getName();
     }
@@ -877,6 +886,6 @@
 }
 
 /* J_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.                                            *
 * J_LZ_COPYRIGHT_END *********************************************************/



More information about the Laszlo-checkins mailing list