From: Pascal B. <pb...@oi...> - 2000-11-09 07:23:09
|
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. Pascal Bestebroer pb...@oi... http://www.oibv.com -----Oorspronkelijk bericht----- Van: dyn...@li... [mailto:dyn...@li...]Namens Robert Rainwater Verzonden: donderdag 9 november 2000 8:15 Aan: mi...@pr... Onderwerp: Re: [Dynapi-Dev] Bug with Dynlayer's deleteAllChildren() & deleteChild() methods Here are some of the questions I have with the patch: DynLayer.prototype.removeChild ------------------------------ "var oChild=this.children[i]" - this is the same as child, right? so why do we need it, child does not change in the loop. It is set before the for loop. Also, if the child does not exist, the oChild is never set and will be null. Won't this kill the removeFromArray using a null parameter. "return arguments[arguments.length-1]" - we need this (sort of). This allows you to say something like addChild(removeChild(child)). Its not used often, but it is very similar to addChild(new DynLayer()). \\Robert -- rra...@ya... _______________________________________________ Dynapi-Dev mailing list Dyn...@li... http://lists.sourceforge.net/mailman/listinfo/dynapi-dev |