Class = XObject.define(
function(ns, name) {
Base.call(this, ns, name);
+ print("Class ctr - parent called");
this.loadExtends();
this.loadImplements();
//console.log("CREATED(Class) " + this.alias);
var pi = GI.object_info_get_parent(bi);
this.extendsClasses = [];
- if (!pi) {
+ if (!pi || (pi.get_namespace() == this.ns && pi.get_name() == this.name )) {
return;
- }
+ }
this.parent = NameSpace.factory(
'Class',
pi.get_namespace(),
this.extendsClasses.push(p);
},this);
+ if (this.parent) {
+ this.parent.addChildClass(this.alias);
+ }
},
+
+ addChildClass : function (n) {
+ this.childClasses.push(n);
+ if (this.parent) {
+ this.parent.addChildClass(n);
+ }
+ },
+
+
loadImplements : function()
{
var bb = this.getBI();