|
From: Robert R. <rra...@ya...> - 2000-11-09 14:35:57
|
I think this should fix the problem:
DynLayer.prototype.deleteChild=function() {
for (var a=0;a<arguments.length;a++) {
var child=arguments[a].getComponent()
if (child.parent == this) {
child.invokeEvent('delete')
child.deleteAllChildren()
DynAPI.removeFromArray(this.children,child)
DynAPI.removeFromArray(this.dyndoc.all,child,true)
if (is.ns && child.elm) {
if (!this.doc.recycled) this.doc.recycled=[]
this.doc.recycled[this.doc.recycled.length]=child.elm
}
if (is.ns4) {
child.doc.open()
child.doc.write('')
child.doc.close()
}
child.deleteElement()
child.parent=null
child.isChild=false
}
}
}
DynLayer.prototype.deleteAllChildren=function() {
for (var i in this.children) this.deleteChild(this.children[i])
}
\\Robert
--
rra...@ya...
> the var oChild is needed so that you know there's actually a child match
> found
> It's set within the "for (var i=..") loop, so although the child variable is
> always
> present, the oChild is needed to verify the existence of the child
>
> There were some other problems I found in the patch, but currently don't
> have
> access to it and can't remember the problems :) but there were some small
> things.
|