X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fxynt%2Fxynt-base.js;fp=web%2Fxynt%2Fxynt-base.js;h=de7cd258db2047e851bee47d36426b0511779306;hb=9f0cbf62feaea515635cfc85bddd5292b2170440;hp=0000000000000000000000000000000000000000;hpb=ff96d86813afe7c2d607bc6ca9d5c18c378c6fed;p=xynt.git diff --git a/web/xynt/xynt-base.js b/web/xynt/xynt-base.js new file mode 100644 index 0000000..de7cd25 --- /dev/null +++ b/web/xynt/xynt-base.js @@ -0,0 +1,179 @@ + +function Extends(sub) +{ + var proto; + thinF = function(){}; + inh = new thinF(); + inh.xynt_sup = []; + inh.xynt_sup_cl = []; + + console.log("EXT START"); + + var multi = function(sub, super, is_last) + { + var proto = super.prototype; + + for (var f in proto) { + if (f == "xynt_sup" || f == "xynt_sup_cl") + continue; + + console.log("LOOP: "+f); + if( f != "constructor" && typeof(proto[f]) == "function" && !is_last){ + console.log("M_FU: "+proto[f]+" F: "+f); + // sub[f] = proto[f]; + sub[f] = function() { + // console.log("INFU PR: " + proto[f] + " FUNC: "+f+" THIS: " + this); + console.log("SIMPLE LOG"); + return proto[f].apply(this,arguments); + } + } + else { + console.log("M_PR: "+proto.name+" A: "+f+" FUN: "+proto[f]); + sub[f] = proto[f]; + } + } + } + + for( var i=1; i < arguments.length ; i++){ + multi(inh, arguments[i], false); + inh.xynt_sup.push(arguments[i].prototype); + inh.xynt_sup_cl.push(arguments[i]); + } + + multi(inh, sub, true); + + + inh.callSuper = function(fnc){ + var len = this.xynt_sup_cl.length; + for ( var i=0 ; i