[Commits] r918 - core/trunk/geoext/lib/GeoExt/data

commits at geoext.org commits at geoext.org
Fri May 29 23:14:34 CEST 2009


Author: tschaub
Date: 2009-05-29 23:14:34 +0200 (Fri, 29 May 2009)
New Revision: 918

Modified:
   core/trunk/geoext/lib/GeoExt/data/ProtocolProxy.js
Log:
Docs for ProtocolProxy (deserves an example and some more description).

Modified: core/trunk/geoext/lib/GeoExt/data/ProtocolProxy.js
===================================================================
--- core/trunk/geoext/lib/GeoExt/data/ProtocolProxy.js	2009-05-29 21:14:01 UTC (rev 917)
+++ core/trunk/geoext/lib/GeoExt/data/ProtocolProxy.js	2009-05-29 21:14:34 UTC (rev 918)
@@ -17,59 +17,57 @@
  * along with GeoExt.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+/** api: (define)
+ *  module = GeoExt.data
+ *  class = ProtocolProxy
+ *  base_link = `Ext.data.DataProxy <http://extjs.com/deploy/dev/docs/?class=Ext.data.DataProxy>`_
+ */
 Ext.namespace('GeoExt', 'GeoExt.data');
 
-/**
- * Class: GeoExt.data.ProtocolProxy
- */
-
-/**
- * Constructor: GeoExt.data.ProtocolProxy
- *
- * Parameters:
- * config - {Object} Config object
- */
 GeoExt.data.ProtocolProxy = function(config) {
     GeoExt.data.ProtocolProxy.superclass.constructor.call(this);
     Ext.apply(this, config);
 };
 
+/** api: constructor
+ *  .. class:: ProtocolProxy
+ *   
+ *      A data proxy for use with ``OpenLayers.Proxy`` objects.
+ */
 Ext.extend(GeoExt.data.ProtocolProxy, Ext.data.DataProxy, {
-    /**
-     * APIProperty: protocol
-     * {<OpenLayers.Protocol>} The protocol used to fetch features.
+
+    /** api: config[protocol]
+     *  ``OpenLayers.Protocol``
+     *  The protocol used to fetch features.
      */
     protocol: null,
 
-    /**
-     * APIProperty: abortPrevious
-     * {Boolean} Whether to abort the previous request or not, defaults
-     * to true.
+    /** api: config[abortPrevious]
+     *  ``Boolean``
+     *  Abort any previous request before issuing another.  Default is ``true``.
      */
     abortPrevious: true,
 
-    /**
-     * Property: response
-     * {<OpenLayers.Protocol.Response>} The response returned by
-     * the read call on the protocol.
+    /** private: property[response]
+     *  ``OpenLayers.Protocol.Response``
+     *  The response returned by the read call on the protocol.
      */
     response: null,
 
-    /**
-     * Method: load
+    /** private: method[load]
+     *  :param params: ``Object`` An object containing properties which are to
+     *      be used as HTTP parameters for the request to the remote server.
+     *  :param reader: ``Ext.data.DataReader`` The Reader object which converts
+     *      the data object into a block of ``Ext.data.Records``.
+     *  :param callback: ``Function`` The function into which to pass the block
+     *      of ``Ext.data.Records``. The function is passed the Record block
+     *      object, the ``args`` argument passed to the load function, and a
+     *      boolean success indicator.
+     *  :param scope: ``Object`` The scope in which to call the callback.
+     *  :param arg: ``Object`` An optional argument which is passed to the
+     *      callback as its second parameter.
      *
-     * Parameters:
-     * params - {Object} An object containing properties which are to be used
-     *     as HTTP parameters for the request to the remote server.
-     * reader - {Ext.data.DataReader} The Reader object which converts the data
-     *     object into a block of Ext.data.Records.
-     * callback - {Function} The function into which to pass the block of
-     *     Ext.data.Records. The function is passed the Record block object,
-     *     the "args" argument passed to the load function, and a boolean
-     *     success indicator
-     * scope - {Object} The scope in which to call the callback
-     * arg - {Object} An optional argument which is passed to the callback
-     *     as its second parameter.
+     *  Calls ``read`` on the protocol.
      */
     load: function(params, reader, callback, scope, arg) {
         if (this.fireEvent("beforeload", this, params) !== false) {
@@ -98,9 +96,8 @@
         }
     },
 
-    /**
-     * Method: abortRequest
-     * Called to abort any ongoing request.
+    /** private: method[abortRequest]
+     *  Called to abort any ongoing request.
      */
     abortRequest: function() {
         // FIXME really we should rely on the protocol itself to
@@ -116,13 +113,11 @@
         }
     },
 
-    /**
-     * Method: loadResponse
-     * Handle response from the protocol
-     *
-     * Parameters:
-     * o - {Object} 
-     * response - {<OpenLayers.Protocol.Response>} 
+    /** private: method[loadResponse]
+     *  :param o: ``Object``
+     *  :param response: ``OpenLayers.Protocol.Response``
+     *  
+     *  Handle response from the protocol
      */
     loadResponse: function(o, response) {
         if (response.success()) {



More information about the Commits mailing list