Hi,

I would do that with a view cursor on the array collection - but I have no idea if it's faster then your method.

Check here: http://livedocs.adobe.com/flex/3/html/help.html?content=about_dataproviders_4.html the section called "Using a view cursor".

_rico


On 09.06.2008, at 22:54, flexawesome wrote:

Hey there,

I had an ArrayCollection and I need to check if name = "carry" is exist in the
ArrayCollection.

I could use objs.source.forEach() to loop the arrayCollection, is there any fast way can do
this as well?

Cheers

public var objs:ArrayCollection = new ArrayCollection();

var obj:Object = new Object();
obj.id = "123";
obj.name = "carry";
objs.addItem(obj);

obj = new Object();
obj.id = "198";
obj.name = "fred";
objs.addItem(obj);

obj = new Object();
obj.id = "223";
obj.name = "henry";
objs.addItem(obj);

obj = new Object();
obj.id = "872";
obj.name = "tom";
objs.addItem(obj);

obj = new Object();
obj.id = "190";
obj.name = "tom2";
objs.addItem(obj);




Reply via email to