projects
/
xynt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3d6b134
)
added new closure to cristalize the function name of the ancestor class to be called
author
Matteo Nastasi (mop)
<nastasi@alternativeoutput.com>
Wed, 7 Dec 2011 07:37:45 +0000
(08:37 +0100)
committer
Matteo Nastasi (mop)
<nastasi@alternativeoutput.com>
Wed, 7 Dec 2011 07:37:45 +0000
(08:37 +0100)
xynt-base.js
patch
|
blob
|
history
diff --git
a/xynt-base.js
b/xynt-base.js
index
8c39a28
..
de7cd25
100644
(file)
--- a/
xynt-base.js
+++ b/
xynt-base.js
@@
-76,6
+76,19
@@
function ExtendsInst(sub)
{
var proto = super.prototype;
{
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')
if (typeof(sub.xynt_sup) == 'undefined')
sub.xynt_sup = new Array();
if (typeof(sub.xynt_sup_cl) == 'undefined')
@@
-98,11
+111,8
@@
function ExtendsInst(sub)
console.log("LOOP: "+f);
if( f != "constructor" && typeof(proto[f]) == "function" && !is_last){
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]);
}
else {
console.log("M_PR: "+proto.name+" A: "+f+" FUN: "+proto[f]);
@@
-110,7
+120,7
@@
function ExtendsInst(sub)
}
}
return true;
}
}
return true;
- }
+ }
;
console.log("POST FUNC");
console.log("POST FUNC");