+ /**
+ * return the Gobject name of a constructor - does not appear to work on structs..
+ * @param {Object} gobject ctr
+ * @return {String} returns name
+ * @member XObject type
+ */
+ type : function(o)
+ {
+ if (typeof(o) == 'object') {
+ return GObject.type_name(o.type);
+ // print("GNAME:" +gname + " GTYPE:"+cfg.xtype.type);
+ }
+ return 'unknown';
+ },
+ /**
+ * return the XObjectBase class for a cfg (which includes an xtype)
+ * @param {Object} configuration.
+ * @return {function} constructor
+ * @member XObject baseXObject
+ */
+ baseXObject : function(cfg)
+ {
+ try {
+ // loocks for XObject/Gtk/TreeView.js [ TreeView = { .... } ]
+ // xns is not a string!!!?
+ var gname = false;
+ if (typeof(cfg.xtype) == 'object') {
+ gname = XObject.type(cfg.xtype);
+
+ }
+ print("TRYING BASE OBJECT : " + gname);
+ // in the situation where we have been called and there is a base object
+ // defining the behavior..
+ // then we should copy the prototypes from the base object into this..
+ var base = gname ? imports.XObjectBase[gname][gname] : false;
+ return base;
+
+ } catch (e) {
+ // if debug?
+ XObject.log("error finding " + gname + " - " + e.toString());
+ return false;
+ }
+
+
+ },
+