yevon-cn / flexpaper

Automatically exported from code.google.com/p/flexpaper
0 stars 0 forks source link

DupImage.removeAllChildren does not remove all children... #49

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Your fix was not quite right.  Now it will leave the second half of the list.

If there are 5 children:

The first time through, i=0 and numchildren=5.
The child at 0 is removed.
Now i=1 and numchildren=4
The child at 0 is removed.
Now i=2 and numchildren=3
The child at 0 is removed.
Now i=3 and numchildren=2

No more children are removed, and 2 are left.

while(numChildren > 0)
    delete(removeChildAt(0);

will work correctly.

Original issue reported on code.google.com by strebor...@gmail.com on 26 Mar 2010 at 12:24

GoogleCodeExporter commented 9 years ago
Corrected in 1.2.4

Original comment by erik.eng...@gmail.com on 27 Mar 2010 at 7:15

GoogleCodeExporter commented 9 years ago
& thanks for the workaround :-)

Original comment by erik.eng...@gmail.com on 27 Mar 2010 at 7:15