Yes, I'm also curious why!
Can you add to the bug why you don't know the index of the item you're trying to remove? removeItem will be slow (ArrayList.removeItem is slow) so it won't be a recommended practice.
Flex SDK Developer
Adobe Systems Inc.
By forcing everyone to use the removeItemAt()-method, there will be many instances where it will be used as ac.removeItemAt( ac.getItemIndex( item ) ) anyway. So that will probably be just as slow, since the index has to be looked up before the item can be removed anyway. I understand that it is easier to remove the item if you know the index already, but this certainly is not always the case.
1 person found this helpful
If I may so, I would say as an example: In a model situation you typically have an ArrayCollection with data and a selected object which is Bindable.
public var persons:ArrayCollection;
public var selectedPerson:Person;
You don't want to keep track of a selectedPersonIndex. That's redundant.
Why isn't there some sort of Array which is a mixture between an ArrayCollection and a Dictionary. It could do removeItem(Object) very fast if it kept the index internally in the Dictionary with the Object as key. Of course it would need to force every object to be unique. But in many cases this is no problem. I think in Java this already exists?