Initial filter bug in properties dialog

Post Reply
Hubert
Posts: 168
Joined: Thu Jul 22, 2004 11:13 am

Initial filter bug in properties dialog

Post by Hubert »

I believe I've discovered a bug in the properties dialog (newsgroups tab). These are the steps to reproduce it:
-Create a view filter, let's call it myfilter
-Create anoter view filter, call it myfilter2
-Important: drag myfilter2 in the filter editor to a position above myfilter
-Assign myfilter to a newsgroup. This works as expected.
-Open the properties dialog again. Instead of 'myfilter', 'myfilter2' is displayed!
-Close the properties dialog (OK button). Now myfilter2 is assigned to the group instead of myfilter. (This to confirm that it's not merely a display issue).
-When myfilter2 is below myfilter in the filter editor list, there's no problem
Regards, Hubert
alex
Posts: 4553
Joined: Thu Feb 27, 2003 5:57 pm

Post by alex »

yes, the first impression it has something to do with whether filter names in the filter editor are arranged in the alphabet order or not, something small, with watch/kill etc. filters no problem so it is something in the newsgroups properties page, i'll fix it here maybe by tomorrow and then let you know what it was.
alex
Posts: 4553
Joined: Thu Feb 27, 2003 5:57 pm

Post by alex »

i found the cause, in windows combo/list boxes the function "FindString" looks for prefix, not for the exact match as I thought, for exact match there is function "FindStringExact", it is not perfect because after reaching the bottom it starts from the top, but in our specific case it will work.

in the program the function is used in 2 places in newsgroup properties and in filter view when it sets the filter list after applying changes, both for setting of the current item.

in short i need to replace FindString to FindStringExact in two places, but for meaningful names it is unlikely to be triggered and thus it is not so urgent to release the fix (i fixed it here so in the next release it will work in this scenario).
Hubert
Posts: 168
Joined: Thu Jul 22, 2004 11:13 am

Post by Hubert »

Thanks for your explanation and - of course - for the upcoming fix, Alex!
Regards, Hubert
Post Reply