PDA

View Full Version : 'ownerDocument' undefined



neeraj.narang
24 Sep 2011, 11:22 PM
Hi,
I'm trying to run the desktop sample in extjs 3.0 and am getting 'y.ownerDocument undefined' error. The code works perfectly fine in the previous versions.
Here's the code:

MyDesktop.BogusModule = Ext.extend(Ext.app.Module, {
init : function(){
this.launcher = {
text: 'Window '+(++windowIndex),
iconCls:'bogus',
handler : this.createWindow,
scope: this,
windowId:windowIndex
}
},

createWindow : function(src){
var desktop = this.app.getDesktop();
var win = desktop.getWindow('bogus'+src.windowId);
if(!win){
win = desktop.createWindow({
id: 'bogus'+src.windowId,
title:src.text,
width:640,
height:480,
html : '<p>Something useful would be in here.</p>',
iconCls: 'bogus',
shim:false,
animCollapse:false,
constrainHeader:true
});
}
win.show();
}
});
MyDesktop.App = new Ext.app.App({
init :function(){
Ext.QuickTips.init();
},

getModules : function(){
return [
new MyDesktop.BogusModule()
];
},

getStartConfig : function(){
return {
title: Ext.state.Manager.get("uname"),
iconCls: 'user',
toolItems: [{
text:'Preferences',
iconCls:'settings',
handler: Ext.emptyFn,
scope:this
},'-',{
text:'Logout',
iconCls:'logout',
handler:function(){
//this.logoutInProgress=true;
//this.fireEvent('beforeunload');
},
scope:this
}]
};
}

});
When I click the Start Button on the desktop, I get the error 'y.ownerDocument undefined'. The same code is working fine with ExtJS 2.1 but is giving error in 3.0.
Could some1 plz tell me what could be the issue...

29 Sep 2011, 10:37 AM
You posted this in the Ext JS 4.0 forum :).... moving.