If I understand your question correctly (and I am not sure that I do), I would personally put your filter function in the file that currently calls the HTTPService and gets the result. Unless you are using one of the, or your own, common frameworks, most people seem to put this in their main application file.
Depending a lot on how your code is constructed, you can probably apply this filter function in the result handler for your HTTPService. If I am missing the point, or your setup is more complex, let me know. As an aside, please take a look at the refresh method of the ListCollectionView. If you are not actually replacing the whole collection, you could use this to simply apply the filter. --Mike --- In [email protected], "pioplacz" <[EMAIL PROTECTED]> wrote: > > Hi! > > I was just wondering is it possible to make a filterfunction work between ViewStack > components. What i mean is i'm calling the HTTP service in my main.mxml but showing > the results in MovieView.mxml passing the data works fine. But i can't figure out where i > should write the filter function: > > // Filter function > public function movieFilter(item:Object):Boolean > { > var result:Boolean=false; > if (!item.title.length > || item.title.toUpperCase().indexOf(filterInput.text.toUpperCase()) >= 0) > if (!item.genres.length > || item.genres.toUpperCase().indexOf(genresInput.selectedItem.data.toUpperCase > ()) >= 0) > result=true; > > return result; > } > > and where i should put: > > movieCollection.filterFunction=movieFilter; > > From the beginning i had all that in my Main.mxml and it worked fine. Can somebody help > me, if you even get what i mean ? > -- 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/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> 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/

