[Lazarus] unit Masks vs. unit FPMasks
juha.manninen62 at gmail.com
Tue Feb 23 15:26:59 CET 2021
On Tue, Feb 23, 2021 at 2:54 PM Bart via lazarus <
lazarus at lists.lazarus-ide.org> wrote:
> MaskEdit is a LCL control and hence has nothing to do in fpc.
I am not suggesting to move MaskEdit to FPC libs obviously.
I have in the past copied bits of TMaskEdit to a related fpc unit
> (cannot remeber exactly which), so that they work the same (setting
> and removing masks IIRC), with the exception that TMaskEdit does this
> on UTF-8, while the fpc unit assumes 1-byte ANSI encoding (so it won't
> work on UTF-8).
> Given the release cycle of fpc, I would strongly advise to have this
> code on "our side" (Lazarus), so bugs can be eliminated much faster.
> The Masks unit is not related to TMaskEdit.
Does it mean the mask syntax is different? I found this:
Is TEditMask the same as TMaskEdit? Or is TEditMask used for TMask? Can you
please explain it so that I understand?
Is it all documented somewhere?
For the Masks unit: the same UTF-8 problems exist with it's fpc
> counterpart IIRC (did not study the code recently).
> So, I would like to keep it "here" as well.
Yes, I realized it must stay in LazUtils. Iterating codepoints is needed.
FPMasks is good for ASCII only despite having UTF8String type.
Does Michael have a plan for that unit?
Fortunately I found a unit test for Masks unit under LCL tests directory. I
moved it under LazUtils in r64653.
I will add tests for multibyte codepoint text. Then optimizing TMask will
be safe. Nothing can go wrong... :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lazarus