[Laszlo-checkins] r11949 - in openlaszlo/trunk/WEB-INF/lps: lfc/data lfc/services lfc/views server/src/org/openlaszlo/js2doc

bargull@openlaszlo.org bargull at openlaszlo.org
Mon Dec 1 09:44:16 PST 2008


Author: bargull
Date: 2008-12-01 09:44:11 -0800 (Mon, 01 Dec 2008)
New Revision: 11949

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapointer.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/services/LzContextMenu.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/js2doc/SchemaBuilder.java
Log:
Change 20081201-bargull-znZ by bargull at dell--p4--2-53 on 2008-12-01 15:57:19
    in /home/Admin/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: add new style setter for "contextmenu"

New Features:

Bugs Fixed: LPP-7418, LPP-7408 (partial)

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

Documentation:

Release Notes:

Details:
SchemaBuilder:
- introduce some new types (or the SchemaBuilder will fail to generate the schema)
LzDatapointer:
- add @type for context (the doc explains that this field points to a clonemanager, but there are actually more possibilities, I've enumerated them in a @devnote)
LaszloView:
- add @type for contextmenu
- add "contextmenu"-setter
- deprecate "setContextMenu(..)"
- use "contextmenu" directly in "getContextMenu()" (deprecate this method, too?)
- remove some legacy code
LaszloCanvas:
- update callers of "setContextMenu(..)"
- add @type for "httpdataprovider" and "defaultdataprovider"
- add description for "onmouseleave" (copied from LzGlobalMouse)
LzContextMenu:
- update callers of "setContextMenu(..)"
- use the new style setters as the real setters
- deprecate the old "setXXX(..)" methods


    

Tests:



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapointer.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapointer.lzs	2008-12-01 16:55:21 UTC (rev 11948)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapointer.lzs	2008-12-01 17:44:11 UTC (rev 11949)
@@ -112,10 +112,13 @@
   * @type LzDataNodeMixin
   */
 var p /*:LzDataNodeMixin*/ = null;//TODO: uncomment after LPP-5840
-// var data = null;
 
 /** The reference to a clonemanager from a clone.
-    @keywords read-only */ 
+  * @devnote context can be one of: 
+  * LzReplicationManager, LzDatapath, LzDataset, AnonDatasetGenerator
+  * @keywords read-only
+  * @type LzReplicationManager
+  */
 var context :* = null;
 
 /** @access private */
@@ -223,7 +226,7 @@
     //LzDataset or AnonDatasetGenerator -> make interface?
     var ppcontext:* = pp.getContext( this );
     var nodes:* = this.__LZgetNodes( pp , ppcontext ? ppcontext : this.p );
-    
+
     if ( nodes == null ) return null;
 
     if ( pp.aggOperator != null ){
@@ -1351,7 +1354,6 @@
             this.errorDel.register( dc , "onerror" );
             this.timeoutDel.register( dc , "ontimeout" );
         }
-
     }
 }
 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/services/LzContextMenu.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/services/LzContextMenu.lzs	2008-12-01 16:55:21 UTC (rev 11948)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/services/LzContextMenu.lzs	2008-12-01 17:44:11 UTC (rev 11949)
@@ -73,7 +73,7 @@
         delete args['delegate'];
 
         // set callback
-        this.setDelegate(del);
+        this.$lzc$set_delegate(del);
     }
 
     /** @access private */
@@ -82,22 +82,25 @@
 
         var ip:LzNode = this.immediateparent;
         if (ip && ip is LzView) {
-            (ip cast LzView).setContextMenu(this);
+            (ip cast LzView).$lzc$set_contextmenu(this);
         }
     }
 
     /** @access private */
-    function $lzc$set_delegate (delegate:*) :void { this.setDelegate(delegate); }
+    function $lzc$set_delegate (delegate:*) :void {
+        this.kernel.setDelegate(delegate);
+    }
 
     /**
       * Sets the delegate which will be called when the menu is opened
       * @param LzDelegate delegate: delegate which is executed when item is selected. An
       * onmenuopen event is also sent.
-      *
+      * @deprecated Use setAttribute('delegate', ...) instead.
       * @access public
       */
-    function setDelegate (delegate:LzDelegate) :void {
-        this.kernel.setDelegate(delegate);
+    final function setDelegate (delegate:LzDelegate) :void {
+        if ($debug) Debug.deprecated(this, arguments.callee, this.setAttribute);
+        this.$lzc$set_delegate(delegate);
     }
 
     /**
@@ -152,8 +155,8 @@
       * @access public
       */
     function makeMenuItem (title:String, delegate:*) :LzContextMenuItem {
-      var item:LzContextMenuItem = new LzContextMenuItem(title, delegate);
-      return item;
+        var item:LzContextMenuItem = new LzContextMenuItem(title, delegate);
+        return item;
     }
 
 }; // End of LzContextMenu
@@ -226,19 +229,29 @@
     }
 
     /** @access private */
-    function $lzc$set_delegate (delegate:*) :void { this.setDelegate(delegate); }
+    function $lzc$set_delegate (delegate:*) :void {
+        this.kernel.setDelegate(delegate);
+    }
 
     /** @access private */
-    function $lzc$set_caption (caption:String) :void { this.setCaption(caption); }
+    function $lzc$set_caption (caption:String) :void {
+        this.kernel.setCaption(caption);
+    }
 
     /** @access private */
-    function $lzc$set_enabled (val:Boolean) :void { this.setEnabled(val); }
+    function $lzc$set_enabled (val:Boolean) :void {
+        this.kernel.setEnabled(val);
+    }
 
     /** @access private */
-    function $lzc$set_separatorbefore (val:Boolean) :void { this.setSeparatorBefore(val); }
+    function $lzc$set_separatorbefore (val:Boolean) :void {
+        this.kernel.setSeparatorBefore(val);
+    }
 
     /** @access private */
-    function $lzc$set_visible (val:Boolean) :void { this.setVisible(val); }
+    function $lzc$set_visible (val:Boolean) :void {
+        this.kernel.setVisible(val);
+    }
 
     /**
       * Sets the delegate which will be called when the menu item is selected
@@ -246,18 +259,22 @@
       * selected. An onselect event is also sent.
       *
       * @access public
+      * @deprecated Use setAttribute('delegate', ...) instead.
       */
-    function setDelegate (delegate:*) :void {
-        this.kernel.setDelegate(delegate);
+    final function setDelegate (delegate:*) :void {
+        if ($debug) Debug.deprecated(this, arguments.callee, this.setAttribute);
+        this.$lzc$set_delegate(delegate);
     }
 
     /**
       * Sets the text string which is displayed for the menu item
       * @param String caption: text string to display
       * @access public
+      * @deprecated Use setAttribute('caption', ...) instead.
       */
-    function setCaption (caption:String) :void {
-        this.kernel.setCaption(caption);
+    final function setCaption (caption:String) :void {
+        if ($debug) Debug.deprecated(this, arguments.callee, this.setAttribute);
+        this.$lzc$set_caption(caption);
     }
 
     /**
@@ -273,27 +290,33 @@
       * Sets the enabled status of the menu item
       * @param boolean val: if false, menu item is grayed out and will not respond to clicks
       * @access public
+      * @deprecated Use setAttribute('enabled', ...) instead.
       */
-    function setEnabled (val:Boolean) :void {
-        this.kernel.setEnabled(val);
+    final function setEnabled (val:Boolean) :void {
+        if ($debug) Debug.deprecated(this, arguments.callee, this.setAttribute);
+        this.$lzc$set_enabled(val);
     }
 
     /**
       * Draw a horizontal separator line before this item in the menu
       * @param boolean val: sets visibility of separator line
       * @access public
+      * @deprecated Use setAttribute('separatorbefore', ...) instead.
       */
-    function setSeparatorBefore (val:Boolean) :void {
-        this.kernel.setSeparatorBefore(val);
+    final function setSeparatorBefore (val:Boolean) :void {
+        if ($debug) Debug.deprecated(this, arguments.callee, this.setAttribute);
+        this.$lzc$set_separatorbefore(val);
     }
 
     /**
       * Sets the visibility of the menu item
       * @param boolean val: sets visibility
       * @access public
+      * @deprecated Use setAttribute('visible', ...) instead.
       */
-    function setVisible (val:Boolean) :void {
-        this.kernel.setVisible(val);
+    final function setVisible (val:Boolean) :void {
+        if ($debug) Debug.deprecated(this, arguments.callee, this.setAttribute);
+        this.$lzc$set_visible(val);
     }
 
 }; // End of LzContextMenuItem

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs	2008-12-01 16:55:21 UTC (rev 11948)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs	2008-12-01 17:44:11 UTC (rev 11949)
@@ -135,8 +135,8 @@
      * transport. The default  value of the <varname>canvas.defaultdataprovider</varname> is initially set to point
      * to this same object. 
      * @access public
+     * @type LzDataProvider
      */
-
     var httpdataprovider = null;
 
 
@@ -147,8 +147,8 @@
      * By default, this will be an instance of <classname>LzHTTPDataProvider</classname>, which will also be pointed to by
      * the <varname>canvas.httpdataprovider</varname>.
      * @access public
+     * @type LzDataProvider
      */
-
     var defaultdataprovider = null;
 
     /**
@@ -413,6 +413,10 @@
     this.sprite = new LzSprite(this, true);
 }
 
+/** Sent whenever the mouse is dragged out of the application window
+  * @access public
+  * @lzxtype event
+  */
 var onmouseleave = LzDeclaredEvent;
 
 /** Sent whenever the number of created nodes changes 
@@ -595,7 +599,6 @@
     if (this.contextmenu == null) {
         this.buildDefaultMenu();
     }
-
 }
 
 /**
@@ -750,9 +753,9 @@
   * Install default menu items for the right-mouse-button 
   * @param LzContextMenu cmenu: LzContextMenu to install on this view
   */
-    function setDefaultContextMenu ( cmenu ){
-        this.setContextMenu(cmenu);
-        this.sprite.setDefaultContextMenu( cmenu );
+function setDefaultContextMenu ( cmenu ){
+    this.$lzc$set_contextmenu( cmenu );
+    this.sprite.setDefaultContextMenu( cmenu );
 }
 
 /**

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs	2008-12-01 16:55:21 UTC (rev 11948)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs	2008-12-01 17:44:11 UTC (rev 11949)
@@ -1743,22 +1743,6 @@
     }
 }
 
-/*
-// @access private
-function __LZFinishDestroyOnIdle (){
-    if ( this.__LZmovieClipRef != null ){
-        //Debug.write( "remove movieclip" );
-        removeMovieClip( this.__LZmovieClipRef );
-        delete this.__LZmovieClipRef;
-    }
-
-  if ( this.__LZbgRef != null ){
-    removeMovieClip( this.__LZbgRef );
-    delete this.__LZbgRef;
-  }
-}
-*/
-
 /**
   * This method sets the <attribute>visible</attribute> attribute of the view
   * and also disables or re-enables any click region associated with the view.
@@ -1773,8 +1757,6 @@
     this.$lzc$set_visible(v)
 }
 
-
-
 /**
   * This method sets the <attribute>visibility</attribute> attribute of the view
   * and also disables or re-enables any click region associated with the view.
@@ -1835,14 +1817,11 @@
     this.$lzc$set_width(v);
 }
 
-
-
-
-    /**
-    * Sets the height of the view the given value. If the view is set to stretch
-    * its resource, the resource will be resized to the new value. If the value
-    * 'null' is given for the new height, then the height is unset, and the height
-    * of the view will be the size measured of its contents.
+/**
+  * Sets the height of the view the given value. If the view is set to stretch
+  * its resource, the resource will be resized to the new value. If the value
+  * 'null' is given for the new height, then the height is unset, and the height
+  * of the view will be the size measured of its contents.
   * @param Number v: The new value for the height
   * @deprecated Use setAttribute('height', ...) instead.
   */
@@ -1851,8 +1830,6 @@
     this.$lzc$set_height(v);
 }
 
-
-
 /**
   * Sets the opacity for the view.  The opacity is a number between 0.0
   * (transparent) and 1.0 (opaque).
@@ -1864,9 +1841,6 @@
     this.$lzc$set_opacity(v);
 }
 
-
-
-
 /**
   * Sets the <attribute>x</attribute> position of the view to the given value.
   * @param Number v: The new value for <attribute>x</attribute>.
@@ -1887,7 +1861,6 @@
     this.$lzc$set_y(v);
 }
 
-
 /**
   * Sets the <attribute>rotation</attribute> for the view to the given value.
   * @param Number v: The new value for <attribute>rotation</attribute>.
@@ -1898,7 +1871,6 @@
     this.$lzc$set_rotation(v);
 }
 
-
 /**
   * Sets the <attribute>alignment</attribute> for the view to the
   * given value. The alignment is based on the size of this view as
@@ -2740,8 +2712,6 @@
 }
 
 
-
-
 /**
   * Makes a view clickable or not clickable.
   * @param Boolean amclickable: Boolean indicating the view's clickability
@@ -3169,25 +3139,34 @@
     this.proxyurl = f;
 }
 
+/**
+  * The current context menu object
+  * @type LzContextMenu
+  */
+var contextmenu:LzContextMenu = null;
 
-var contextmenu:LzContextMenu =  null;
+/** @access private */
+function $lzc$set_contextmenu (cmenu:LzContextMenu) :void {
+    this.contextmenu = cmenu;
+    this.sprite.setContextMenu( cmenu );
+}
 
 /**
   * Install menu items for the right-mouse-button 
   * @param LzContextMenu cmenu: LzContextMenu to install on this view
+  * @deprecated Use setAttribute('contextmenu', ...) instead.
   */
-function setContextMenu ( cmenu ){
-    this.contextmenu = cmenu;
-    this.sprite.setContextMenu( cmenu );
+final function setContextMenu ( cmenu ){
+    if ($debug) Debug.deprecated(this, arguments.callee, this.setAttribute);
+    this.$lzc$set_contextmenu(cmenu);
 }
 
-
 /**
   * Returns the current context menu object
   * @access public
   */
 function getContextMenu ( ){
-    return this.sprite.getContextMenu();
+    return this.contextmenu;
 }
 
 /** @access private */

Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/js2doc/SchemaBuilder.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/js2doc/SchemaBuilder.java	2008-12-01 16:55:21 UTC (rev 11948)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/js2doc/SchemaBuilder.java	2008-12-01 17:44:11 UTC (rev 11949)
@@ -675,10 +675,13 @@
         } else if ("sizeExpression".equals(s)) {
             result = "size";
         } else if ("Array".equals(s) ||
+                   "LzContextMenu".equals(s) ||
                    "LzDataNodeMixin".equals(s) ||
+                   "LzDataProvider".equals(s) ||
                    "LzDelegate".equals(s) ||
                    "LzNode".equals(s) ||
                    "LzParam".equals(s) ||
+                   "LzReplicationManager".equals(s) ||
                    "LzView".equals(s) ||
                    "Object".equals(s) ||
                    "[LzView]".equals(s) ||



More information about the Laszlo-checkins mailing list