One thing which might not be clear when working with ArrayCollections in Flex is how to replace an item in the collection. The methods getItemAt and addItemAt are pretty clear in their purpose, but one method which I found myself over looking is the setItemAt method which could be more aptly named replaceItemAt as that is exactly what it does. It replaces an item in the collection.
So next time you're looking to replace an item in an ArrayCollection and wishing there was a replaceItemAt method, look no further than setItemAt.
Hello. I have a new blog.
I've moved this blog to the following URL Kerkness.ca. Thank you for visiting, please update your bookmarks.
No comments:
Post a Comment
Thank you for the comments.