[Lazarus] unit Masks vs. unit FPMasks

Bart bartjunk64 at gmail.com
Tue Mar 2 15:22:07 CET 2021


On Mon, Mar 1, 2021 at 8:16 PM José Mejuto via lazarus
<lazarus at lists.lazarus-ide.org> wrote:


> I've uploaded last TMask* code to my github, this way its easier to
> track changes.
>
> https://github.com/JoshyFun/pascal_tmask

First we will fork Lazarus 2.2
Then work in mask unit can proceed.

I wonder if we could have both implementations sied by side for a
while (so masks = old one, the new one whould have an appropriate new
neame like lazmasks or similar). The component should still be called
TMask and TMaskList and the function MatchesMask(list) should remain.
This way backwards compatibility is preserved.
And we buy ourselves time.
Later on we can then deprecate the old masks unit (in 2.4) and only
use the new one (remove the old one in 2.6).

The advantage of this is that the new implementation is not hindered
by the old implementation.
So, no need to implement TMask.MatchesWindowsMask in the new implementation.

I did not study th enew implementation in depth, but things like
escaping sound OK, if configurable.
Case sensitivity must be configurable, and in contrast to TMask we
might choose to implement is as
CaseSensitive/CaseInsensitive/OSDefault.
Doing it in such a way would also make adapting the TShell* controls
easier, we can simply publish a property that controls the options for
the mask.

-- 
Bart


More information about the lazarus mailing list