check on the is_last condition fixed
authorMatteo Nastasi <matteo.nastasi@lucinilucini.com>
Wed, 16 Nov 2011 08:18:26 +0000 (09:18 +0100)
committerMatteo Nastasi <matteo.nastasi@lucinilucini.com>
Wed, 16 Nov 2011 08:18:26 +0000 (09:18 +0100)
prova.html

index bfd3f7d..07dd606 100644 (file)
@@ -127,6 +127,11 @@ Summo.prototype = {
     name: "Summo",
     s_attr: null,
 
+    c_func: function()
+    {
+         console.log("c_func overwrited");
+    },
+
     s_func: function()
     {
          this.a_func();
@@ -153,7 +158,7 @@ function Extends(sub)
 
         for (var f in proto) {
             console.log("LOOP: "+f);
-            if( f != "constructor" && typeof(proto[f]) == "function" && is_last){
+            if( f != "constructor" && typeof(proto[f]) == "function" && !is_last){
                 console.log("PR: "+proto['name']+"  F: "+f);
                 // sub[f] = proto[f];
                 sub[f] = function(){