young_matthewd
23 Jul 2007, 4:48 AM
using Ext 1.1 rc1 with IE 6 and FireFox 2.0.5
must disposing of panels in the wrong way because anytime the layout is recalled in IE (6) an error associated with getBoundingClientRect() is called. have seen other posts that say the error arises because of duplicate elements or that there is an element missing.
when i create panels and add them into the center region I make a new object which extends observable:
MATRIX.widget.baseElement.Edit = function(config) {
Ext.apply(this, config);
// add some events (destroy/beforedestroy/render/etc...)
MATRIX.widget.baseElement.Edit.superclass.constructor.call(this);
};
Ext.extend(MATRIX.widget.baseElement.Edit, Ext.util.Observable, {
// properties ....
// renders the Edit panel
render : function(){
if(!this.rendered && this.fireEvent("beforerender", this) !== false) {
// create Panel
this.panel = new Ext.ContentPanel(this.id , {
autoCreate: true,
title: this.title,
closable: true,
autoScroll: true
});
/**
* add to application layout (layout part of singelton class
* called on startup)
*/
var layout = MATRIX.layout.ApplicationController.getLayout();
layout.add('center', this.panel);
/**
* listen for remove of panel via the region
*/
layout.getRegion(this.region).on('panelremoved', this.destroy, this);
/**
* display panel in region
*/
layout.getRegion(this.region).showPanel(this.panel.getId());
/**
* objects inheriting this get their onRender called
*/
this.onRender();
/**
* earmark rendered so the next render call
* simply returns the element
*/
this.rendered = true;
/**
* singal that element is rendered
*/
this.fireEvent("render", this);
}
return this;
},
// other funcitons
destroy : function() {
if(this.fireEvent("beforedestroy", this) !== false) {
this.purgeListeners();
/**
* inherited destory
*/
this.beforeDestroy();
this.onDestroy();
/**
* signal destroy / notify Mgr
*/
this.fireEvent("destroy", this);
MATRIX.widget.elementMgr.unregister(this);
}
}
});
inside the onDestroy from inherited classes to baseElement.Edit I remove items/buttons associated with forms and in the destroy i take away listeners.
even if I remove (by issuing a delete) the passed "this" (housing the reference to the panel, form, etc) in the elementMgr when the unregister is called the error still pops up in IE.
kind of a show stopper for me since we use IE.
must disposing of panels in the wrong way because anytime the layout is recalled in IE (6) an error associated with getBoundingClientRect() is called. have seen other posts that say the error arises because of duplicate elements or that there is an element missing.
when i create panels and add them into the center region I make a new object which extends observable:
MATRIX.widget.baseElement.Edit = function(config) {
Ext.apply(this, config);
// add some events (destroy/beforedestroy/render/etc...)
MATRIX.widget.baseElement.Edit.superclass.constructor.call(this);
};
Ext.extend(MATRIX.widget.baseElement.Edit, Ext.util.Observable, {
// properties ....
// renders the Edit panel
render : function(){
if(!this.rendered && this.fireEvent("beforerender", this) !== false) {
// create Panel
this.panel = new Ext.ContentPanel(this.id , {
autoCreate: true,
title: this.title,
closable: true,
autoScroll: true
});
/**
* add to application layout (layout part of singelton class
* called on startup)
*/
var layout = MATRIX.layout.ApplicationController.getLayout();
layout.add('center', this.panel);
/**
* listen for remove of panel via the region
*/
layout.getRegion(this.region).on('panelremoved', this.destroy, this);
/**
* display panel in region
*/
layout.getRegion(this.region).showPanel(this.panel.getId());
/**
* objects inheriting this get their onRender called
*/
this.onRender();
/**
* earmark rendered so the next render call
* simply returns the element
*/
this.rendered = true;
/**
* singal that element is rendered
*/
this.fireEvent("render", this);
}
return this;
},
// other funcitons
destroy : function() {
if(this.fireEvent("beforedestroy", this) !== false) {
this.purgeListeners();
/**
* inherited destory
*/
this.beforeDestroy();
this.onDestroy();
/**
* signal destroy / notify Mgr
*/
this.fireEvent("destroy", this);
MATRIX.widget.elementMgr.unregister(this);
}
}
});
inside the onDestroy from inherited classes to baseElement.Edit I remove items/buttons associated with forms and in the destroy i take away listeners.
even if I remove (by issuing a delete) the passed "this" (housing the reference to the panel, form, etc) in the elementMgr when the unregister is called the error still pops up in IE.
kind of a show stopper for me since we use IE.