Hello,
i have next problem: i want call from other place in code - i do it with
Code:
MyDesktop.OrdersWindow.prototype.openTranslatorsDetail();
but i have problem with scope for this function. How i can fix it?
Code:
MyDesktop.OrdersWindow = Ext.extend(Ext.app.Module, {
id:'orders-win',
init : function(){
this.launcher = {
text:'Zlecenia',
iconCls:'icon-grid',
handler : this.openDetail,
scope: this
};
},
openTranslatorsDetail:function(){
console.log(this);
console.log(this.app);
console.log(this.app.getDesktop());
var desktop = this.app.getDesktop();
var win = desktop.getWindow('orders-translators-win');
if(!win){
win = desktop.createWindow({
id:'orders-translators-win',
title:'Szczegó?y t?umacza',
iconCls:'icon-grid',
width:500,
height:500,
layout:'form',
shim:false,
animCollapse:true,
constrainHeader:false,
items:{}
})
};
win.show();
...
},
createWindow : function(){
var desktop = this.app.getDesktop();
...
...
}