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";
132 console.log("c_func overwrited");
140 console.log("name: "+this.name);
144 Extends(Summo, A, B, C);
146 function Extends(sub)
150 thinF = function(){};
153 console.log("INIZIO EXT");
155 var multi = function(sub, super, is_last)
157 var proto = super.prototype;
159 for (var f in proto) {
160 console.log("LOOP: "+f);
161 if( f != "constructor" && typeof(proto[f]) == "function" && !is_last){
162 console.log("PR: "+proto['name']+" F: "+f);
163 // sub[f] = proto[f];
165 console.log("INFU PR: " + proto['name'] + " FUNC: "+f);
166 return proto[f].apply(this,arguments);
170 console.log("PR: "+proto.name+" A: "+f+" FUN: "+proto[f]);
176 for( var i=1; i < arguments.length ; i++){
177 console.log("INIZIO LOOP");
178 multi(inh, arguments[i], false);
179 supers.push(arguments[i].prototype);
181 multi(inh, sub, true);
193 <div id="board" style="width: 1600; height: 800px; background-color: #f0f0f0; border: 1px solid black; position: relative;">
194 <div id="r1" style="width: 1600; height: 40px; left: 0px; top: 0px; background-color: #e8e8e8; border: 0px solid red; position: absolute;">
195 <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>
198 <div id="r2" style="width: 1600; left: 0px; top: 40px; height: 40px; background-color: #e8e8ff; border: 0px solid red; position: absolute;">
199 <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>
202 <div id="r3" style="width: 1600; height: 40px; left: 0px; top: 80px; background-color: #e8e8e8; border: 0px solid red; position: absolute;">
203 <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>
206 <div id="r4" style="width: 1600; left: 0px; top: 120px; height: 40px; background-color: #e8e8ff; border: 0px solid red; position: absolute;">
207 <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>