- Returns whether the view contains the specified object. Unlike the 
IViewCursor.findxxx methods, this search is succesful only if it 
finds an item that exactly matches the parameter.

trace ({label:keyword} == {label:keyword}); // false

You can sort the collection, create a view cursor and use findAny.

http://livedocs.macromedia.com/flex/2/langref/mx/collections/ListColl
ectionView.html#createCursor()
http://livedocs.macromedia.com/flex/2/langref/mx/collections/IViewCur
sor.html

Or just loop through it yourself.

You could also convert the data into an array and use the some/every 
methods on it; kinda the same as looping through all of em.

--- In flexcoders@yahoogroups.com, Webdevotion <[EMAIL PROTECTED]> 
wrote:
>
> Hello,
> 
> Can someone explain me the use of ListCollectionView.contains( ) ?
> 
> I can't get it to work.
> 
> var keyword:String = txtSearch.text;
> if( !keywords.contains( {label:keyword} ))
> {
>       keywords.addItem( {label:keyword} );
> }
> 
> 
> tnx !
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to