我有下面的代碼:如何執行我的回調函數是一個自定義的Dojo模塊?
define(["dojo/_base/declare"],function (declare) {
return declare("tamoio.Map", null, {
methodA: function(param){
console.log(param);
this.methodB('xxx',function(){
this.methodC(); //it didn't call!
});
},
methodB: function(text, callback){
alert('do nothing: ' + text);
callback();
},
methodC: function(){
alert('hello');
}
});
});
當我運行我的應用程序收到messege:
Uncaught TypeError: Object [object global] has no method 'methodC'
該怎麼辦。我祈求我的模塊中的內部方法?
我使用道場1.9.1
最好的問候,
雷南
夥計們,我通過函數methodC作爲回調函數,然後另一個函數 – rbarbalho