[Lazarus] unit Masks vs. unit FPMasks
Juha Manninen
juha.manninen62 at gmail.com
Wed Feb 24 14:47:48 CET 2021
MaskList is used in TCustomShellTreeView.GetFilesInDir().
It sets a mask option *moDisableSets*. Why are sets disabled? Is it to stay
compatible with FindFirstUTF8() syntax?
I don't fully understand the comment. Why would EConvertError be raised?
//Disable the use of sets in the masklist.
//this behaviour would be incompatible with the situation if no
MaskList was used
//and it would break backwards compatibilty and could raise
unexpected EConvertError where it did not in the past.
//If you need sets in the MaskList, use the OnAddItem event for that.
(BB)
MaskOptions := [moDisableSets];
{$ifdef NotLiteralFilenames}
if (ACaseSensitivity = mcsCaseSensitive) then
MaskOptions := [moDisableSets, moCaseSensitive];
{$else}
if (ACaseSensitivity <> mcsCaseInsensitive) then
MaskOptions := [moDisableSets, moCaseSensitive];
{$endif}
MaskList := TMaskList.Create(MaskStr, ';', MaskOptions); //False by
default
Anyway I don't see why a useful Mask syntax should be disabled. Can this be
solved by other means?
Can José's mask do a similar thing?
Juha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210224/2beb9b1b/attachment.html>
More information about the lazarus
mailing list