[Lazarus] TMask revisited

Bart bartjunk64 at gmail.com
Thu Oct 14 18:54:32 CEST 2021


On Wed, Oct 13, 2021 at 5:16 PM Juha Manninen via lazarus
<lazarus at lists.lazarus-ide.org> wrote:


> Please test everybody. I will read the old posts more carefully later.

You have changed the existing interface for both TMask and the
Matches(Windows)Mask(List) functions.
TMaskOptions has been removed.
Noticable the ability to NOT interpret [] as a set in the mask has now
disappeared.
>From my test program:
FAIL
Filename: 'Heoworld', MaskList: 'He[lo]world',
Options=[moDisableSets], WindowsMask=FALSE
ResOld: FALSE, ResNew: TRUE

This is not some cornercase: Suppose you have files that have
filenames like foo[1].dat, foo[2].dat etc.
Now you could specify a mask of 'foo[*].dat' with the moDisableSets
option set and it would find those files.
The new implementation won't.
(This was the usecase of the person who reported the bug for
TShellListView, which first was hacked by using [[] to mean a single
'[', but later was properly fixed by adding the TMaskOptions.

This was discussed at length in february.

Now you're doing it all over again.
You have sacrificed consistent and reliable behaviour for gain of speed.

-- 
Bart


More information about the lazarus mailing list