Hi Folks,
View.removeMediator() is now responsible for what will be 3 Maintenance releases. Be
very careful with your implementation.
The current issue is that when removing the observers that hold references to a given mediator, each observer list is traversed and when a reference is found it the observer is removed from the list with Array.splice(). This causes all the observers from that point on to move back one in the array. Since we are in an iterator driven loop, the next time the iterator is advanced, it actually skips over the one its supposed to be examining, because it moved back by one during the last iteration.
This will cause a release 1.7 of the AS3 reference implementation sometime within the next week.
If you haven't seen it yet, have a look at this bug report:
http://forums.puremvc.org/index.php?topic=145.0I'll be implementing the fix described as
'Copy the survivors' in my response there. You might want to have a look at implementing this in your ports.
-=Cliff>