Re: [flexcoders] Re: Removing an item from a sorted ArrayCollection?

2008-11-25 Thread Jules Suggate
Yeah, I second this suggestion. IViewCursor is your friend :) And I know I haven't added much to the discussion -- but I want to contribute, not just leech off everyone! You guys are too quick to reply! :) On Tue, Nov 25, 2008 at 16:15, gabriel montagné [EMAIL PROTECTED]wrote: On Mon, Nov

Re: [flexcoders] Re: Removing an item from a sorted ArrayCollection?

2008-11-24 Thread bjorn
Thanks for that suggestion .. it seems to behave the same way though. I can partly fix this by doing a myAc.refresh() every time, but I see all kinds of strange behaviour (elements will be duplicated, etc.). No one knows the answer to my initial question about why there is a problem implementing

[flexcoders] Re: Removing an item from a sorted ArrayCollection?

2008-11-24 Thread Amy
--- In flexcoders@yahoogroups.com, bjorn [EMAIL PROTECTED] wrote: Thanks for that suggestion .. it seems to behave the same way though. I can partly fix this by doing a myAc.refresh() every time, but I see all kinds of strange behaviour (elements will be duplicated, etc.). No one knows

Re: [flexcoders] Re: Removing an item from a sorted ArrayCollection?

2008-11-24 Thread gabriel montagné
On Mon, Nov 24, 2008 at 3:45 AM, bjorn [EMAIL PROTECTED] wrote: No one knows the answer to my initial question about why there is a problem implementing removeItemAt()/addItemAt() on a sorted AC? Well, the cool thing about using those mx.collections.* classes, as opposed to, for example, just

[flexcoders] Re: Removing an item from a sorted ArrayCollection?

2008-11-21 Thread Amy
--- In flexcoders@yahoogroups.com, bjorn [EMAIL PROTECTED] wrote: I experienced some problems with ArrayCollection's removeItemAt(). It seemed to work... randomly. Tucked away in the documentation i found this little gem: Note: If you use the ICollectionView interface to sort or filter a

Re: [flexcoders] Re: Removing an item from a sorted ArrayCollection?

2008-11-21 Thread Haykel BEN JEMIA
Try doing something like this: var obj:Object = mySortedArray.getItemAt(index); var originalIndex:int = mySortedArray.list.getItemIndex(obj); mySortedArray.list.removeItemAt(originalIndex); I didn't test the code. But the idea behind it is that a ListcollectionView holds a pointer to the IList