You should be able to get what you want if you set it up correctly.  The AC and 
LCV should be separate instances sharing the same source or list property

Alex Harui
Flex SDK Developer
Adobe Systems Inc.<http://www.adobe.com/>
Blog: http://blogs.adobe.com/aharui

From: [email protected] [mailto:[email protected]] On Behalf 
Of Scott
Sent: Friday, March 27, 2009 4:57 AM
To: [email protected]
Subject: RE: [flexcoders] arraycollection vs listcollectionview

That's a nasty little bug.

I haven't encountered that myself yet but I can see where that would happen.

You may want to change your remove function to fire only on a button click and 
not a component update (component.remove).

 Scott

________________________________
From: [email protected] [mailto:[email protected]] On Behalf 
Of arieljake
Sent: Friday, March 27, 2009 1:33 AM
To: [email protected]
Subject: [flexcoders] arraycollection vs listcollectionview


I'm confused.

I have an ArrayCollection. And I listen for the COLLECTION_CHANGE.Remove event 
to know when to delete the item from the database.

For displaying the contents of my ArrayCollection, i am using a 
ListCollectionView with a filter function applied to it, so that the filter 
function does not affect all views using the same ArrayCollection.

But, when I change the value of a property on an item in the ArrayCollection 
that causes the filter to now filter OUT the item, the ListCollectionView 
dispatches a COLLECTION_CHANGE.Remove event.

This causes my code to remove the item from the db, undesirably.

Now I understand that the ListCollectionView must dispatch these events to 
update the ListBase, but why isn't the target different so that I can tell 
whether the Remove event came from the ArrayCollection itself or just a 
ListCollectionView of it?

--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, and is
believed to be clean.

Reply via email to