开发者

flex list with itemRenderer

I have a simple list bounded to an ArrayCollection and an itemRenderer

When I add a new item to the Arr开发者_StackOverflow社区ayCollection, I get the event addedToStage: FINE

Trouble is when I remove an item from the ArrayCollection, I never events : I tried: remove, removed, removedFromStage and I need to stop a stream when the items is removed:

So HOW can I get an event when an ITEM is REMOVED ?

Thanks


Thing is item renderers are recycled. So when you remove the item from your collection, the item renderer is not destroyed, it's just given another data.

You can add an event listener on the dataChange event or override the set data function.

What are your tring to do exactly?


You should listen to the ArrayCollection events if you want to know if the ArrayCollection instance is changed. But I'm not sure what you are trying to accomplish. If you remove an item from the ArrayCollection then you should know that it is removed. Why or where do you need an event?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜