From: Andrew G. <an...@zo...> - 2003-08-01 03:11:18
|
Are you using the latest nightly build? There was a serious bug in the deleteAllChildren() function that was only fixed a few days ago (29 July). You'll need to make sure you're using the very latest version of event.js. Andrew. James Musick wrote: > > This seems really silly, but I'm having trouble getting rid of > objects that are children of another object. > > This is the code: > > alert("fnChildLoad function: \n" + > "oCallingObject=" + oCallingObject +"\n"+ > "oCallingObject.length=" + oCallingObject.items.length); > > for(var i=0; i<oCallingObject.items.length; i++) > { > //alert(oCallingObject + "\n" + oCallingObject.items[i]); > //oCallingObject.deleteChild(oCallingObject.items[i]); > //oCallingObject.items[i].deleteFromParent(); > //oCallingObject.items[i].del(); > } > //oCallingObject.deleteAllChildren(); > > alert("fnChildLoad after delete: \n" + > "oCallingObject.length=" + oCallingObject.items.length); > > And none of these things seem to work. > Both oCallingObject & oCallingObject.items[i] (in the alert) are the > objects that I expect them to be, but the oCallingObject.items.length > value is 14 both before and after the delete I tried. I tried all the > ways that seemed reasonable... > > The weird thing is that even though the objects are still there, > something is happening to them because when I am iterating through > them again some values are null that wouldn't have been null before > (size, etc). > > Ugh!!! Any suggestions? It's driving me crazy. > > Thank you, > -James > |