14 console.log("INIZIO EXT");
16 var multi = function(sub, super, is_last)
18 var proto = super.prototype;
20 for (var f in proto) {
21 if (f == "xynt_sup" || f == "xynt_sup_cl")
24 console.log("LOOP: "+f);
25 if( f != "constructor" && typeof(proto[f]) == "function" && !is_last){
26 console.log("M_FU: "+proto['name']+" F: "+f);
29 console.log("INFU PR: " + proto['name'] + " FUNC: "+f+" THIS: " + this);
30 return proto[f].apply(this,arguments);
34 console.log("M_PR: "+proto.name+" A: "+f+" FUN: "+proto[f]);
40 for( var i=1; i < arguments.length ; i++){
41 multi(inh, arguments[i], false);
42 inh.xynt_sup.push(arguments[i].prototype);
43 inh.xynt_sup_cl.push(arguments[i]);
46 multi(inh, sub, true);
48 inh.superrr = function(cl, method) {
49 console.log("xyx "+cl);
50 // console.log("xx"+arguments[0]);
51 // return this.xynt_sup_cl[cl].method.apply(this,arguments.slice(2));
56 console.log(sub.prototype.xynt_sup);
57 console.log(sub.prototype.xynt_sup_cl);
60 function ExtendsInst(sub)
64 console.log("INIZIO EXT INST");
66 var multi = function(sub, super, is_last)
68 var proto = super.prototype;
70 if (typeof(sub.xynt_sup) == 'undefined')
71 sub.xynt_sup = new Array();
72 if (typeof(sub.xynt_sup_cl) == 'undefined')
73 sub.xynt_sup_cl = new Array();
75 for (var f in proto) {
76 if (f == "xynt_sup" || f == "xynt_sup_cl")
79 if (typeof(sub[f]) != 'undefined')
82 console.log("LOOP: "+f);
83 if( f != "constructor" && typeof(proto[f]) == "function" && !is_last){
84 console.log("M_FU: "+proto['name']+" F: "+f);
86 console.log("INFU PR: " + proto[f] + " FUNC: "+f+" THIS: " + this);
87 return proto[f].apply(this, arguments);
91 console.log("M_PR: "+proto.name+" A: "+f+" FUN: "+proto[f]);
98 console.log("POST FUNC");
100 for( var i=1; i < arguments.length ; i++){
101 console.log("POST FUNC IN LOOP");
103 if (i+1 < arguments.length && typeof(arguments[i+1]) != 'function') {
107 if (multi(sub, cl, false) == false) {
108 console.log("POST FUNC FALSE 1");
112 console.log("POST FUNC PRE APPLY");
114 console.log("POST FUNC POST APPLY");
116 sub.xynt_sup.push(cl.prototype);
117 sub.xynt_sup_cl.push(cl);
120 console.log("FINE EXT INST");
124 function show_class(cl) {
125 console.log("Attributes Class of "+cl);
126 for (f in cl.prototype) {
127 console.log(f+": ["+cl.prototype[f]+"]");
132 function show_inst(inst) {
133 console.log("Attributes Instance of "+inst);
135 console.log(f+": ["+inst[f]+"]");