7 Replies Latest reply on Sep 14, 2009 12:32 AM by oli4dejonge

    Still no removeItem(item:Object) for ArrayCollection?

    Oorburg

      Hi,

       

      I don't know if this issue has been brought up earlier.. if so sorry but I could not find it on any of the forums.

       

      We've been using Flex since Flex 2 and have wondered since the beginning why the class ArrayCollection has no removeItem()-method.

      Everybody seems to be using the rather tedious workaround ac.removeItemAt( ac.getItemIndex( item ) ) while it's very simple to create a removeItem()-method with the same functionality. So that is what we did: extend the ArrayCollection to incorporate the removeItem()-method.

       

      Since we now have version 4 of the SDK, we noticed some things have changed in the ArrayCollection (like the setAll() methods), but sadly still no removeItem(). Some further investigation shows that the internal ArrayList used by ArrayCollection does have a removeItem()-method.

       

      Are we missing something here? Why is the ArrayCollection not calling the list.removeItem()-method ?

       

      Could someone shed some light on this ?

      Thank you!

       

      Rogier Oorburg