[Lazarus] Attn José: TWindowsMask oddity?

Bart bartjunk64 at gmail.com
Mon Nov 1 23:02:34 CET 2021


On Mon, Nov 1, 2021 at 7:30 PM José Mejuto via lazarus
<lazarus at lists.lazarus-ide.org> wrote:

> > A note: IIRC (do not have the source at hand here) you escape [ ] and
> > \, with or withoud mocEscapeChar enabled.
> > if mocEscapeChar is not enabled, escaping these in the mask is
> > probably not what you want.
>
...
> In the other hand I recall why the escape is necessary instead disabling
> features, to mimic the "file?.dat" which must be transformed to my TMask
> "file[?].dat", if I left the "AnyCharOrNone" enable and disable sets and
> ranges this mask will not be interpreted correctly "fil[?.dat" so
> escaping in that function is a must.

Yes, I saw that you call inherited Create with TMaskOpCodesAllAllowed.
So, it works as designed (ans as you expected it to work).

> > So, I changed it (and documented it as a change that breaks backwards
> > compatibility).
>
> That's a design decision, I choose the other one based in the reason
> exposed.

Yes, I agree.
Of course this was not meant as criticism.

Whil at it yesterday, I also implemented read/write access for
properties mask, maskopcodes, quirks for all classes that use them.

I think I also need to write a setter for AutoReverseRange property
(you have it in a define, so it cannot be altered at runtime).
And since I was makig all parameter in the constructor available as a
r/w property, I alos should take care of CaseSensitive.

-- 
Bart


More information about the lazarus mailing list