FilterList(Matcher) doesn't refilter

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

FilterList(Matcher) doesn't refilter

Fabian Zeindl
Hi,

 I have a FilterList F1 with a TextMatcherEditor.

On top of that list I create another FilterList F2 with a simple lambda as Matcher passed to the constructor.

The first lists gives me my text-matches, the second lists displays them only if the search text is longer than 1 character.

The text-filtering works, but the Matcher of F2 is only called initially, when I change the text of the TextMatcherEditor, F2's output doesn't change.

Is this intended behaviour?

Regards
Fabian
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FilterList(Matcher) doesn't refilter

mauromol
Hi,
it has been quite a lot of time I'm not working with FitlerLists,
Matchers and MatcherEditors, but from what I've understood, you mean
that F2 matcher is somewhat bound to the text you enter into the
TextMatcherEditor?
If so, it won't work, as the matcher is "static", you need a
MatcherEditor on F2 too, if you want to react "live" to the changes in
the text you enter.

Right now, with just a matcher on F2, F2 contents will change only when
F1 contents change, too.

Mauro

Il 24/11/2016 08:50, Fabian Zeindl ha scritto:

> Hi,
>
>   I have a FilterList F1 with a TextMatcherEditor.
>
> On top of that list I create another FilterList F2 with a simple lambda as Matcher passed to the constructor.
>
> The first lists gives me my text-matches, the second lists displays them only if the search text is longer than 1 character.
>
> The text-filtering works, but the Matcher of F2 is only called initially, when I change the text of the TextMatcherEditor, F2's output doesn't change.
>
> Is this intended behaviour?
>
> Regards
> Fabian


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FilterList(Matcher) doesn't refilter

Fabian Zeindl
Yes, the F2 matcher is bound to the text (captured in a lambda) (this is actually Kotlin code, not Java).

What surprises me is that I put loggia-statements into the F2 matcher and it wasn't called anymore.

Fabian

> On 24 Nov 2016, at 09:37 , Mauro Molinari <[hidden email]> wrote:
>
> Hi,
> it has been quite a lot of time I'm not working with FitlerLists, Matchers and MatcherEditors, but from what I've understood, you mean that F2 matcher is somewhat bound to the text you enter into the TextMatcherEditor?
> If so, it won't work, as the matcher is "static", you need a MatcherEditor on F2 too, if you want to react "live" to the changes in the text you enter.
>
> Right now, with just a matcher on F2, F2 contents will change only when F1 contents change, too.
>
> Mauro
>
> Il 24/11/2016 08:50, Fabian Zeindl ha scritto:
>> Hi,
>>
>>  I have a FilterList F1 with a TextMatcherEditor.
>>
>> On top of that list I create another FilterList F2 with a simple lambda as Matcher passed to the constructor.
>>
>> The first lists gives me my text-matches, the second lists displays them only if the search text is longer than 1 character.
>>
>> The text-filtering works, but the Matcher of F2 is only called initially, when I change the text of the TextMatcherEditor, F2's output doesn't change.
>>
>> Is this intended behaviour?
>>
>> Regards
>> Fabian
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FilterList(Matcher) doesn't refilter

robeden
If your list chain is: Something->F1->F2...

I would expect F2's matched to be called if elements are added to F1. So, if you have a tighter filter for F1 and then it's relaxed, you'll probably see the Matcher hit there.

If not, maybe you could supply some short sample code to illustrate what you're seeing.
On Sat, Nov 26, 2016 at 5:45 AM Fabian Zeindl <[hidden email]> wrote:
Yes, the F2 matcher is bound to the text (captured in a lambda) (this is actually Kotlin code, not Java).

What surprises me is that I put loggia-statements into the F2 matcher and it wasn't called anymore.

Fabian

> On 24 Nov 2016, at 09:37 , Mauro Molinari <[hidden email]> wrote:
>
> Hi,
> it has been quite a lot of time I'm not working with FitlerLists, Matchers and MatcherEditors, but from what I've understood, you mean that F2 matcher is somewhat bound to the text you enter into the TextMatcherEditor?
> If so, it won't work, as the matcher is "static", you need a MatcherEditor on F2 too, if you want to react "live" to the changes in the text you enter.
>
> Right now, with just a matcher on F2, F2 contents will change only when F1 contents change, too.
>
> Mauro
>
> Il 24/11/2016 08:50, Fabian Zeindl ha scritto:
>> Hi,
>>
>>  I have a FilterList F1 with a TextMatcherEditor.
>>
>> On top of that list I create another FilterList F2 with a simple lambda as Matcher passed to the constructor.
>>
>> The first lists gives me my text-matches, the second lists displays them only if the search text is longer than 1 character.
>>
>> The text-filtering works, but the Matcher of F2 is only called initially, when I change the text of the TextMatcherEditor, F2's output doesn't change.
>>
>> Is this intended behaviour?
>>
>> Regards
>> Fabian
>
>

Loading...