[Lazarus] TMask revisited

Juha Manninen juha.manninen62 at gmail.com
Tue Oct 19 19:11:30 CEST 2021


On Tue, Oct 19, 2021 at 5:34 PM Bart via lazarus <
lazarus at lists.lazarus-ide.org> wrote:

> With only eMaskOpcodeOptionalChar enabled [a-z] would match 'a', '-' or
> 'z'?
> (This would be the old behaviour of TMask)
>

There is now a constant MaskOpCodesNoEscape which leaves out
eMaskOpcodeAnyCharOrNone and eMaskOpcodeEscapeChar.
It matches more or less with the old behavior and is used in the ...Legacy
constructors and functions.

The eMaskOpcodeOptionalChar enum name is not very self-explanatory,
> maybe we should come up with another name (better now than in half a
> year).
>

Suggestions?

And maybe a constant that has all opcodes except the ones that enable
> ranges.
>

There is MaskOpCodesDisableRange which leaves out eMaskOpcodeAnyCharOrNone,
eMaskOpcodeRange and eMaskOpcodeOptionalChar.
It is used in unit ShellCtrls.


I forgot to answer this earlier :
> The corresponding Create in TMaskBase is not deprecated: is that by
design?

The Create in TMaskBase is never called directly by a user. He will get a
deprecated message from elsewhere.

Juha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20211019/6c80d47e/attachment.html>


More information about the lazarus mailing list