X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=xynt-base.js;h=de7cd258db2047e851bee47d36426b0511779306;hb=ff96d86813afe7c2d607bc6ca9d5c18c378c6fed;hp=35dd58e271fd78bb3d8b790dd229add034012418;hpb=63c94961b0af39593bdaf5a2c7af4b5228db9a35;p=xynt.git diff --git a/xynt-base.js b/xynt-base.js index 35dd58e..de7cd25 100644 --- a/xynt-base.js +++ b/xynt-base.js @@ -19,10 +19,11 @@ function Extends(sub) console.log("LOOP: "+f); if( f != "constructor" && typeof(proto[f]) == "function" && !is_last){ - console.log("M_FU: "+proto['name']+" F: "+f); + console.log("M_FU: "+proto[f]+" F: "+f); // sub[f] = proto[f]; - sub[f] = function(){ - console.log("INFU PR: " + proto['name'] + " FUNC: "+f+" THIS: " + this); + sub[f] = function() { + // console.log("INFU PR: " + proto[f] + " FUNC: "+f+" THIS: " + this); + console.log("SIMPLE LOG"); return proto[f].apply(this,arguments); } } @@ -62,9 +63,6 @@ function Extends(sub) */ sub.prototype = inh; - console.log(sub.prototype.xynt_sup); - console.log([ [ "xynt_sup_cl", "zogo" ], sub.prototype.xynt_sup_cl]); - console.log("EXT FINISH"); } @@ -78,6 +76,19 @@ function ExtendsInst(sub) { var proto = super.prototype; + var single = function(sub, fun) { + var cur_fun = fun; + + sub[cur_fun] = function(){ + // console.log("INFU PR: " + proto[f] + " FUNC: "+f+" THIS: " + this); + console.log("SIMPLE LOG INST: "+cur_fun); + console.log(proto[cur_fun]); + console.log(sub); + console.log(arguments); + return proto[cur_fun].apply(this, arguments); + } + }; + if (typeof(sub.xynt_sup) == 'undefined') sub.xynt_sup = new Array(); if (typeof(sub.xynt_sup_cl) == 'undefined') @@ -100,11 +111,8 @@ function ExtendsInst(sub) console.log("LOOP: "+f); if( f != "constructor" && typeof(proto[f]) == "function" && !is_last){ - console.log("M_FU: "+proto['name']+" F: "+f); - sub[f] = function(){ - console.log("INFU PR: " + proto[f] + " FUNC: "+f+" THIS: " + this); - return proto[f].apply(this, arguments); - } + console.log("M_FU: "+proto[f]+" F: "+f); + single(sub, f); } else { console.log("M_PR: "+proto.name+" A: "+f+" FUN: "+proto[f]); @@ -112,7 +120,7 @@ function ExtendsInst(sub) } } return true; - } + }; console.log("POST FUNC");