PDA

View Full Version : app.getDesktop problem



proofmoore
16 Jun 2011, 5:09 AM
MyDesktop = new Ext.app.App({
init :function(){
Ext.QuickTips.init();
},

getModules : function(){
return [
new MyDesktop.QueryModule(),
new MyDesktop.FileExplorer()
];
},
getStartConfig : function(){
....
}
});

in QueryModule window i call selectTab function from a different js file


function selectTab() {
var desktop = MyDesktop.app.getDesktop();
var win = desktop.getWindow('sorgulama-win');
if(!win){
alert("desktop-win")
}
};

and getting this error:

MyDesktop.app is undefined
[Break On This Error] var desktop = MyDesktop.app.getDesktop();

but when i write it in "createWindow : " in the same js it works. is there a way to access my desktop app anywhere?

proofmoore
16 Jun 2011, 10:46 PM
any idea?

skirtle
17 Jun 2011, 3:56 PM
Try typing console.dir(MyDesktop); into the JavaScript console, see what it looks like.