In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces what are the replication methods of Flex ArrayCollection in Flex. It is very detailed and has a certain reference value. Friends who are interested must finish reading it.
Replication of Flex ArrayCollection in Flex
During the development of Flex, you often encounter the situation of copying Flex ArrayCollection. In the past, I just used to find a way to use it from the Internet, but I didn't specifically figure out why. When I have time today, I have studied it and summarized it as follows:
Replication in Flex, like java, is divided into deep replication and shallow replication.
◆ summarizes the shallow replication of Flex ArrayCollection. There are four methods:
1. VarnewArray:ListCollectionView=newListCollectionView (ListCollectionView (oldArray) .list)
2. VarnewArray:Flex ArrayCollection=newFlex ArrayCollection (oldArray.source)
3. VarnewArray:Flex ArrayCollection=newFlex ArrayCollection (oldArray.source.slice ())
4. VarnewArray:Flex ArrayCollection=newFlex ArrayCollection (oldArray.toArray ())
Among the above methods, * is not recommended because it is not a separate Flex ArrayCollection object created. The second, third and fourth methods are similar and can be used for reference.
Sometimes, we also use deep replication in ◆, as follows:
VarnewArray:Flex ArrayCollection=Flex ArrayCollection (this.clone (oldArray))
The this.clone () method is defined as follows:
Functionclone (source:Object): * {varmyBA:ByteArray=newByteArray (); myBA.writeObject (source); myBA.position=0; return (myBA.readObject ());} these are all the contents of the article "what are the ways to copy Flex ArrayCollection in Flex". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.