Changed the looping for the removal methods to go last to first [1]. I've been playing with a second copy of the code where I override all the methods and don't bother calling the parent(super). Been working fine lol. Even made an additional addEventLister / event method that removes itself after the first dispatch. I think I may keep fiddling with this. It's providing some good functionality.
[1] https://github.com/KesslerConsulting/example/commit/5ac765999f7c8a7893dd59b50f43f6650bd60843 -Mark On Tue, Jul 16, 2013 at 8:41 PM, Justin Mclean <jus...@classsoftware.com>wrote: > Hi, > > > > https://github.com/KesslerConsulting/example/commit/30ee4b96911d301ea09516324241c4bc9d734f16 > > Very quick glance, but I think that removing items from a list when you're > looping to the number of original items in the list can get you into > trouble. > for (nLoopingIndex = 0; nLoopingIndex < nListenerTotal; nLoopingIndex++) > > It's best to loop backwards to avoid this issue. Like so: > for (nLoopingIndex = nListenerTotal -1 ; nLoopingIndex >= 0; > nLoopingIndex--) > > I'd also use bracket notation rather than getItemAt but perhaps that's > just me? > > You might also need to think about stage events and the like. > > Thanks, > Justin