PDA

View Full Version : Sometimes Ext.EventObject is null



zouyu
15 Oct 2007, 9:54 PM
We had a strange problem, sometimes the application works O.K., sometimes it says Ext.EventObject is null in ext-all.js in object Ext.EventManager.

I thought it was caused by multiple onDocumentReady listeners so I moved all the initialization code into a single javascript function but the problem still persists. There are EditorGrid, DateField and TabPanel controls from EXTJS used on the page.

Does anyone have any clue? Thanks!

evant
15 Oct 2007, 9:57 PM
You need to post your code.

zouyu
16 Oct 2007, 12:02 AM
I thought of code, but it is very lengthy. Let me make it short at first.

We defined a init function like this,
var SGSExtGrid1_Example = {
init : function(){
...

SGSExtGrid1_dataGrid = new Ext.grid.EditorGrid('SGSExtGrid1', {
ds: SGSExtGrid1_dataStore,
cm: colModel,
clicksToEdit: 1,
selModel: new Ext.grid.CellSelectionModel()
});
...
SGSExtGrid1_dataGrid.render();

try{
furtherInit();
}catch(e_onDataReady){}

}
Ext.onReady(SGSExtGrid1_Example.init, SGSExtGrid1_Example);

And here is a part of the furtherInit function which is used to add tab pages,
function furtherInit()
{
initTabPages();
}
function initTabPages(){
initializeDateHandler();

// basic tabs 1, built from existing content
var tabs = new Ext.TabPanel('south');

var tb1=tabs.addTab('Conclusions', "Conclusions");
tb1.on('activate', function(){
try{TabClick(this.id);$("txtActiveTab").value=this.id;}catch(e){}
});

var tb2=tabs.addTab('Products', "Products");
tb2.on('activate', function(){
try{TabClick(this.id);$("txtActiveTab").value=this.id;}catch(e){}
});
var tb3= tabs.addTab('Loadings', "Loadings");
tb3.on('activate', function(){
try{TabClick(this.id);$("txtActiveTab").value=this.id;}catch(e){}
});
var tb4=tabs.addTab('Special', "Special");
tb4.on('activate', function(){
try{TabClick(this.id);$("txtActiveTab").value=this.id;}catch(e){}
});
//tabs.activate($F("txtActiveTab"));
tabs.activate('Products');

}

P.S. This is a ASP.Net web page