Filter visits every entry in the data source. If you've got a lot, it can take a while.
________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of arieljake Sent: Friday, March 21, 2008 10:07 AM To: [email protected] Subject: [flexcoders] Re: Continuous refresh() on ICollectionView Yes, exactly. It's for a filter. What I am thinking about is if I am going to type my first name into a text input (A-r-i-e-l), if I bind the change event directly, the list will be filtered 5 times, once for each letter in my name. But if I delay for say 300 ms after each letter, and reset the timer when each letter is clicked, then perhaps I will type the whole name before the timer has a chance to expire and actually call refresh for the first time. The filter is applied only once. I guess you answer my question by saying that there is no performance issue, that filtering happens quickly. My concern is that the filter after the last letter is typed will not be delayed while the other invocations of refresh are taking place. --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , EECOLOR <[EMAIL PROTECTED]> wrote: > > I can not see the need for a refresh on a ICollectionView from typing in a > TextInput field. Usually a TextInput field changes only one property of one > object in the ICollectionView. If that property is bindable, it's change > will be reflected in the display. > > On the other hand, I just thought of a situation where we indeed do exactly > as you descibe. We have a filter that is driven by a TextInput. In this case > we indeed call the refresh method on the ICollectionView when the text > changes. > This has been (so far) no problem and did not cause any problems. The > filtering was performed perfectly well and very responsive. > > > Greetz Erik > > On 3/21/08, arieljake <[EMAIL PROTECTED]> wrote: > > > > I am binding the change event of a textinput field to a function that > > will call refresh() on an ICollectionView. What I was wondering is if > > it would be smarter to use some sort of Timer to call the refresh > > function to avoid filtering too many times since someone will be > > typing a string of characters. Anyone dealt with this? > > >

