Can anyone tell me the applicable differences between an ArrayCollection and a Vector in flex? I'm unsure if I should be using one over the other. I saw that Vector is type safe and that makes me feel better, but are there disadvantages?
public var ac:ArrayCollection = new ArrayCollection();
versus
public var vec:Vector.<String> = new Vector.<String>();
Thanks.
Additionally, Vector is about 3 times faster than Array, which is about 18 times faster than ArrayCollection.
rule of thumb is
AND
I was searching for a way to convert from a vector to an arraycollection so I can use it as a dataprovider and I found this:
http://www.bealearts.co.uk/blog/2010/10/10/vectorcollection-class-to-allow-binding-to-an-as3-vector/comment-page-1/#comment-9486
David Beale created a wrapper over the vector class and it gives it all functionality that I need. At this moment he did not create a performance benchmark but I still think is faster then an arrayCollection.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With