查看下面的示例以了解我要执行的操作:
//Caller.js
callingFunction : function (...)
{
var a = new Assistant();
console.log("This object has been returned ", a.showDialog(...));
},
//Assistant.js
showDialog : function (...)
{
deferred.then(lang.hitch(this, this._showDialog));
//I want to return someObject to callingFunction
},
_showDialog : function (dialogData)
{
...
...
return someObject;
},}