From: Kevin <ke...@ke...> - 2003-05-19 19:01:52
|
See below. "Raymond Irving" <xw...@ya...> wrote: > Hi Kevin, > > A few things to note about the TabManager updates: > > 1) The changes you've made to the DynKeyEvent does not > work with the existing DynKeyEvent example. any ideas? No. I'd rather you put back the original example that I fixed if that's ok. File attached. > 2) Do these changes support keyevent bubbling? As far as setting the defaultValue=false in your own handler will stop bubble. > 3) I modified the _destroy() changes to ready as > follows: > > note: dyndocument.destroyAllChildren will call > ._destroy() function on the children which will then > call _destroyAllChildren() > > p._destroy = function() { > this._destroyAllChildren(); // note change here > this.removeAllEventListeners(); > if (this.elm) this._remove(); > DynObject.all[this.id] = null; > this.children = null; > this.frame = null; > > this.bgImage = null; > this.bgColor = null; > this.html = null; > this.x = null; > this.y = null; > this.w = null; > this.h = null; > this.z = null; > this.doc = null; > this.css = null; > this._dyndoc = null; > this.parent = null; > }; > p._destroyAllChildren = function() { > for (var i=0;i<this.children.length;i++) { > this.children[i]._destroy(); > //delete this.children[i]; // - is this necessary? > seeing that children will be set to [] Yes. Each children[i]=new ... is memory that needs to be freed/deleted. children=[] just clears an array of pointers to the memory. > } > this.children = []; > }; > > > Shouldn't ._destroyAllChildren() be called > .destroyAllChildren()? So we can call > lyr.destroyAllChildren(); > > Agree with the above (#3)? Is it different to my fix? If so it will need testing again. I agree if it works on all browsers. - Kevin > > -- > Raymond Irving > |