Benutzer:J*/Ka-Mel-Oh/Testgelände/Notizzettel: Unterschied zwischen den Versionen
< Benutzer:J* | Ka-Mel-Oh | Testgelände
Zur Navigation springen
Zur Suche springen
J* (Diskussion | Beiträge) (Die Seite wurde neu angelegt.) |
J* (Diskussion | Beiträge) |
||
| Zeile 1: | Zeile 1: | ||
| − | + | __NOTOC__ | |
| − | + | __NEWSECTIONLINK__ | |
| + | ==Framework: Array.prototype und Async== | ||
| + | <!-- | ||
Test = function (a) { | Test = function (a) { | ||
| Zeile 25: | Zeile 27: | ||
* var a = [1,2,3]; | * var a = [1,2,3]; | ||
* a.where( function(e) { return(e>1) } ) | * a.where( function(e) { return(e>1) } ) | ||
| − | * | + | * -> gibt zurück: [2,3] |
*/ | */ | ||
| Zeile 118: | Zeile 120: | ||
x.start( { blubb:5 } ); | x.start( { blubb:5 } ); | ||
| + | --> | ||
| + | ==Klassenarchitektur der Karten== | ||
| + | <!-- | ||
| + | function X () | ||
| + | { | ||
| + | this.constructor(1,2,3,4) | ||
| + | } | ||
| + | X.prototype = new Card() | ||
| + | |||
| + | |||
| + | function add(a,b,c,d) | ||
| + | { | ||
| + | a = new Function( "this.constructor(" + | ||
| + | parseInt(a) + "," + | ||
| + | parseInt(b) + "," + | ||
| + | parseInt(c) + "," + | ||
| + | parseInt(d) + ")" | ||
| + | ); | ||
| + | a.prototype = new Card(); | ||
| + | return a; | ||
| + | } | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | fkt1 = add(1,2,3,4); | ||
| + | fkt2 = add(2,7,8,9); | ||
| + | fkt2.prototype.hooks.bla = | ||
| + | |||
| + | c = new fkt2(); | ||
| + | c instanceof fkt2 | ||
| + | --> | ||
Version vom 21. Februar 2009, 13:30 Uhr