I'm trying to figure out the syntax to check for the existence of a 
value in an array (that's inside an array collection) to see if I 
need to add a new entry or ignore (to get an array of unique 
entries).  I had originally tried using array.indexOf but that will 
only work with simple arrays.

here is an example of what I am trying, but the 'contains' statement 
only evaluates to false, regardless of what I have tried.

function testArray() {  
        var test:Array = [{Classname:"class 10",data:1},
{Classname:"class 11",data:2}]; 
        var testAc:ArrayCollection = new ArrayCollection(test);
        //Alert.show(testAc[1].Classname.indexOf('class 11'));
                        
        for (var i=0;i<test.length;i++) {
                Alert.show(testAc.contains('class 10').toString());
        }

}

Any ideas?






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get to your groups with one click. Know instantly when new email arrives
http://us.click.yahoo.com/.7bhrC/MGxNAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
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