0
Javaでsuperのように、子どものanchestor関数をどのように呼び出すのですか?合金コントローラの継承でsuper()を使用する方法
parent.js
exports.test = function(){
Ti.API.info('Parent Function');
}
child.js
exports.baseController = 'parent';
exports.test = function() {
// super.test(); <-- should print "Parent Function"
Ti.API.info('Child Overriden Function');
}
Appceleratorの合金継承:http://docs.appcelerator.com/platform/latest/#!/guide/Inheritance
試してみてください。解決策は機能しません。 –
これを子関数で使用すると実際には無限再帰ループが発生します –
誰かが答えを探して落ちる場合に備えて '$ .test()'を使います –