JSDOC/ScopeNamer.js
[app.jsdoc] / XObject.js
index b7f1edd..d4f6bfd 100644 (file)
@@ -6,7 +6,6 @@
  
 /**
  * @class XObject
- * @namespace XObject
  * 
  * Yet another attempt to create a usable object construction library for seed..
  * 
@@ -21,6 +20,7 @@
  * Extend this.. to use it's wonderful features..
  * 
  * normal usage:
+ * <pre><code>
  * XObject = imports.XObject.XObject;
  * 
  * Xyz = new XObject({
  *     ]
  *  });
  *  Xyz.init(); // create and show.
+ * </code></pre>
  * 
- * 
+ * He's some questions.
+ * - should we generate ID's for all elements? (if so we probably need to garbage collect)
+ * - should we have a special property to use as the constructor / gobject.properties rather
+ *   than sending all basic types to this?
+ *
+ *  
  * 
  * @cfg xtype {String|Function} constructor or string.
  * @cfg id {String}  (optional) id for registry
  * @cfg listeners {Object}   (optional) map Gobject signals to functions
  * @cfg pack {Function|String|Array}   (optional) how this object gets added to it's parent
  * @cfg el {Object}   (optional) premade GObject
- * 
- *  --- needs a xdebug option!
- * 
- * 
- * He's some questions.
- * - should we generate ID's for all elements? (if so we probably need to garbage collect)
- * - should we have a special property to use as the constructor / gobject.properties rather
- *   than sending all basic types to this?
- *
- * 
- * 
+ *  
  */
 
 function XObject (cfg) {
@@ -68,21 +64,26 @@ function XObject (cfg) {
 
 XObject.prototype = {
     /**
-     * @property el {GObject} the Gtk / etc. element.
+     * @type {GObject}
+     * the Gtk / GObject element.
      */
     el : false, 
-    /*
-     * @property items {Array} list of sub elements
+    /**
+     * @type  {Array}
+     * list of sub elements
      */
+    items : false,
     /**
-     * @property parent {XObject} parent Element
+     * @type {XObject}
+     * parent Element
      */
-     
+    parent: false, 
      /**
-     * @property config {Object} the construction configuration.
+     * @type {Object}
+     * the constructor configuration.
      */
+    config: false,
      /**
-      * @method init
       * Initializes the Element (el) hooks up all the listeners
       * and packs the children.
       * you can override this, in child objects, then 
@@ -182,10 +183,9 @@ XObject.prototype = {
       
      
      /**
-      * @method addItem
       * Adds an item to the object using a new XObject
       * uses pack property to determine how to add it.
-      * @arg cfg {Object} same as XObject constructor.
+      * @param {Object} o same as XObject constructor.
       */
     addItem : function(o) {
         
@@ -233,11 +233,10 @@ XObject.prototype = {
         
     },
     /**
-      * @method addListener
       * Connects a method to a signal. (gjs/Seed aware)
       * 
-      * @arg sig  {String} name of signal
-      * @arg fn  {Function} handler.
+      * @param {String} sig  name of signal
+      * @param {Function} fn  handler.
       */
     addListener  : function(sig, fn) 
     {
@@ -257,11 +256,10 @@ XObject.prototype = {
         
     },
      /**
-      * @method get
       * Finds an object in the child elements using xid of object.
       * prefix with '.' to look up the tree.. multiple '..' to look further up..
       * 
-      * @arg name  {String} name of signal
+      * @param {String}  name  name of signal
       * @return   {XObject|false} the object if found.
       */
     get : function(xid)
@@ -303,7 +301,7 @@ XObject.prototype = {
  * @param {Object} config The source of the properties
  * @param {Object} defaults A different object that will also be applied for default values
  * @return {Object} returns obj
- * @member XObject extend
+ * @static
  */
 
 
@@ -327,7 +325,7 @@ XObject = XObject.extend(XObject,
      * @param {Object} obj The receiver of the properties
      * @param {Object} config The source of the properties
      * @return {Object} returns obj
-     * @member Object extendIf
+     * @static
      */
 
 
@@ -366,7 +364,6 @@ XObject = XObject.extend(XObject,
      * @param {Object} superclass The class being extended
      * @param {Object} overrides (optional) A literal with members
      * @return {Function} constructor (eg. class
-     * @method define
      */
     define : function(){
         // inline overrides
@@ -406,7 +403,6 @@ XObject = XObject.extend(XObject,
      * returns a list of keys of the object.
      * @param {Object} obj object to inspect
      * @return {Array} returns list of kyes
-     * @member XObject keys
      */
     keys : function(o)
     {
@@ -418,8 +414,7 @@ XObject = XObject.extend(XObject,
     },
       
     /**
-     * @member XObject createDelegate
-     * creates a delage metdhod
+     * creates a delegate method (binds scope to a method call)
      * @param {Function} method to wrap
      * @param {Object} scope 
      * @param {Array} args to add