Tuesday, November 19, 2002

A WAY for inherit from foxet lib,it could inherit from class list
and it could distinguish private and public (value and method ).
but this way is not a good way for Class with parameter
just to show it

_global.cExFrom=function(){
var a=arguments;
var al=arguments.length;
for(i=al-1;i>0;i--){
a[i-1].prototype.__proto__=a[i].prototype;
a[i-1].prototype.__constructor__=a[i];
a[i].prototype.constructor();
ASSetPropFlags(a[i-1].prototype,["__constructor__","constructor"],1)
}

}
A=function(){
var av="pri"
this.Aa=23
this.kk=function(){return av}
}
B=function(){
var m=2323;
this.Ba=44
}

C=function(){
this.cc=2234
}
cExFrom(C,B,A)
obj=new C()
for(var m in obj)trace(m)

No comments: