[flexcoders] Re: Looping Through A DataProvider In Flex 2.0

2006-05-03 Thread vestcomprogrammer
Thanks that worked. --- In flexcoders@yahoogroups.com, "Doug Lowder" <[EMAIL PROTECTED]> wrote: > > > What about this: > > searchDP(FontFamily.dataProvider, "label", style.fontFamily); > > > public function searchDP(arrToSearch:ArrayCollection, field:String, > value:String):Number > { >  

[flexcoders] Re: Looping Through A DataProvider In Flex 2.0

2006-05-02 Thread Doug Lowder
What about this: searchDP(FontFamily.dataProvider, "label", style.fontFamily); public function searchDP(arrToSearch:ArrayCollection, field:String, value:String):Number{   for (var idx = 0; idx < arrToSearch.length; ++idx) {   if (arrToSearch.getItemAt(idx)[field] == value) {return idx}; } r