Since it's deferred, there is nothing for it to return before that function ends. Instead, pass a callback into showDialog
and have it call that callback when the deferred fires.
Re your comment below:
Do you know how I would add a callback to that?
It's been years since I used Dojo, so it may have features to make this shorter, but the usual way would look like this:
showDialog : function (callback)
{
deferred.then(lang.hitch(this, function() {
this._showDialog();
callback(/*...whatever it is you want to pass back...*/);
}));
},
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…