3 <script type="text/javascript" src="commons.js"></script>
4 <script type="text/javascript" src="xynt-dd.js"></script>
5 <script type="text/javascript" src="xynt-link.js"></script>
6 <script type="text/javascript">
17 console.log("NAME: "+this.name);
22 this.super.constructor.call(this);
31 console.log("NAME: "+this.name);
32 console.log("NNAME: "+this.nname);
36 function Extends_simple(sub, super)
38 var thinF = function(){};
39 thinF.prototype = super.prototype;
40 var tmp = new thinF();
42 for( var f in sub.prototype) {
43 tmp[f] = sub.prototype[f];
44 tmp['constructor'] = sub;
46 if( super.prototype.constructor == Object.prototype.constructor ){
47 super.prototype.constructor = super;
49 tmp['super'] = super.prototype;
53 Extends_simple(Caino, Adamo);
57 console.log("A "+c.alupa);
58 console.log("G "+c.gojira);
59 console.log("U "+c.unko);
69 a_attr: "a attr content",
74 console.log("A_NAME: "+this.a_din);
75 console.log("A_ATTR: "+this.a_attr);
88 this.b_din = "bonobo";
93 b_attr: "b attr content",
97 console.log("B_NAME: "+this.b_din);
98 console.log("B_ATTR: "+this.b_attr);
103 this.c_din = "canuca";
108 c_attr: "c attr content",
112 console.log("C_NAME: "+this.c_din);
113 console.log("C_ATTR: "+this.c_attr);
119 this.s_name = "caino";
135 console.log("name: "+this.name);
139 Extends(Summo, A, B, C);
141 function Extends(sub)
145 thinF = function(){};
148 console.log("INIZIO EXT");
150 var multi = function(sub, super, is_last)
152 var proto = super.prototype;
154 for (var f in proto) {
155 console.log("LOOP: "+f);
156 if( f != "constructor" && typeof(proto[f]) == "function" && is_last){
157 console.log("PR: "+proto['name']+" F: "+f);
158 // sub[f] = proto[f];
160 console.log("INFU PR: " + proto['name'] + " FUNC: "+f);
161 return proto[f].apply(this,arguments);
165 console.log("PR: "+proto.name+" A: "+f+" FUN: "+proto[f]);
171 for( var i=1; i < arguments.length ; i++){
172 console.log("INIZIO LOOP");
173 multi(tmp, arguments[i], false);
174 supers.push(arguments[i].prototype);
176 multi(tmp, sub, true);
188 <div id="board" style="width: 1600; height: 800px; background-color: #f0f0f0; border: 1px solid black; position: relative;">
189 <div id="r1" style="width: 1600; height: 40px; left: 0px; top: 0px; background-color: #e8e8e8; border: 0px solid red; position: absolute;">
190 <div id="t1" style="z-index: 1; left: 10px; top: 10px; width: 100px; height: 21px; border: 1px solid gray; background-color: #c0c0ff; position: absolute;"></div>
193 <div id="r2" style="width: 1600; left: 0px; top: 40px; height: 40px; background-color: #e8e8ff; border: 0px solid red; position: absolute;">
194 <div id="t2" style="z-index: 1; left: 123px; top: 10px; width: 100px; height: 21px; border: 1px solid gray; background-color: #c0ffc0; position: absolute;"></div>
197 <div id="r3" style="width: 1600; height: 40px; left: 0px; top: 80px; background-color: #e8e8e8; border: 0px solid red; position: absolute;">
198 <div id="t3" style="z-index: 1; left: 10px; top: 10px; width: 100px; height: 21px; border: 1px solid gray; background-color: #c0c0ff; position: absolute;"></div>
201 <div id="r4" style="width: 1600; left: 0px; top: 120px; height: 40px; background-color: #e8e8ff; border: 0px solid red; position: absolute;">
202 <div id="t4" style="z-index: 1; left: 123px; top: 10px; width: 100px; height: 21px; border: 1px solid gray; background-color: #c0ffc0; position: absolute;"></div>