Can only remove first child of CCLayer...

Can only remove first child of CCLayer...
0.0 0



My application allows the user to add and remove labels and sprites to and from a CCLayer. I’m currently handling removing by calling removeFromParentAndCleanup on the selected node. This works fine in FIFO order (removing the first child placed, then the second, etc.), but not in any other order. In any other order, it fails to find the child object in ccArrayGetIndexOfObject and returns CC_INVALID_INDEX. I’ve checked to make sure that the nodes are properly added, and they are. They’re still able to be selected by iterating through the child nodes. It’s just that the address in the layer’s child array is somehow changed from the address that was added for each address beyond the first one. Any ideas on why this isn’t working? Is there a demo where children are removed in non-FIFO order?



After integrating the latest github code, this bug has been resolved. Thanks.