//<script type="text/javascript">
-GIRepository = imports.gi.GIRepository;
-GObject = imports.gi.GObject;
+const GIRepository = imports.gi.GIRepository;
+const GObject = imports.gi.GObject;
/**
* XObject
* Yet another attempt to create a usable object construction library for seed..
}
if (!this.el && xtypeof == 'object') {
+ XObject.log(this.xtype.toString());
XObject.log("obj?" + XObject.keys(this.config).join(','));
try {
if (!isSeed) {
// gjs does not like properties that do not exist..
-
- var li = this.config.listeners;
- delete this.config['listeners'];
- }
+ this.el = new (this.xtype)({});
+ XObject.extend(this.el, this.config);
+
+ } else {
- this.el = new (this.xtype)(this.config);
+ this.el = new (this.xtype)(this.config);
+ }
} catch(e) {
print(JSON.stringify(e,null,4));
print(JSON.stringify(this.config,null,4));
}
},
-
+ /**
+ * usefull for compatibilyt.
+ *
+ */
+ isSeed : typeof(Seed) != 'undefined',
/**
* Copies all the properties of config to obj, if the do not exist.
* @param {Object} obj The receiver of the properties