我有下面的代码:如何执行我的回调函数是一个自定义的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