Created
February 27, 2013 02:11
-
-
Save phi-jp/5044342 to your computer and use it in GitHub Desktop.
tmlib.js クラス定義サンプル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tm.define("SubSubHoge", { | |
superClass: "foo.SubHoge", | |
init: function(a, b, c) { | |
this.superInit(a, b); | |
this.c = c; | |
} | |
}); | |
tm.define("foo.SubHoge", { | |
superClass: "Hoge", | |
init: function(a, b) { | |
this.superInit(a); | |
this.b = b; | |
} | |
}); | |
tm.define("Hoge", { | |
init: function(a) { | |
this.a = a; | |
} | |
}); | |
tm.main(function() { | |
var sub = SubSubHoge(1, 2, 3); | |
console.dir(sub); | |
console.dir(tm.classes); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment