Difference between Array and ArrayCollection(Flex)

假装没事ソ 提交于 2019-12-05 05:04:53

First, the ArrayCollection is designed for the Flex framework. It acts like a Proxy for a given Array instance. This means it can listen for modifications made to the source Array and update it self when this happens. It also contains a subset of additional methods required specifically by the framework (have a look at the IList implementation for instance).

One important difference is that ArrayCollection raises events whenever it is modified. This allows you to do data binding on it more effectively than you could do on an Array.

An ArrayCollection is a wrapper for an Array that lets it be used by GUI elements. Iterating through them is a bit tricky however, see here: http://npcomplete.weebly.com/1/post/2009/10/for-loops-in-actionscript.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!