Skip to content

Instantly share code, notes, and snippets.

@phi-jp
Created February 27, 2013 02:11
Show Gist options
  • Save phi-jp/5044342 to your computer and use it in GitHub Desktop.
Save phi-jp/5044342 to your computer and use it in GitHub Desktop.
tmlib.js クラス定義サンプル
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