Hi,
I tried to catch the onclose event of popup by Ext.TaskManager but i doesnt run. Could you tell me what is the problem in my code?
Thank you
Code:
createEditor: function(){
this.editor = Ext.create('widget.texteditor',{
height: 200
});
var toolbar = this.editor.getToolbar();
toolbar.add({
iconCls: 'icon-attachment',
scope: this,
handler: function() {
var myWindow = window.open('<%=PopupUrl(.....................');
this.pollForWindowClosure(myWindow);
}
});
return this.editor;
},
pollForWindowClosure: function(myWindow){
if (myWindow.closed){
this.myFunc();
return;
}
//setTimeout(function(){this.pollForWindowClosure(myWindow)}, 10);
Ext.TaskManager.start({
//run: this.refresh,
run: function(){this.pollForWindowClosure(myWindow)},
scope: this,
interval: 10
});
},
myFunc: function(){
alert('789');
},