Ignore:
Timestamp:
Jul 11, 2018, 3:49:23 PM (6 years ago)
Author:
chronos
Message:
  • Modified: Reordered items in Tools menu.
  • Added: Icon to Document check.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/UCommon.pas

    r186 r187  
    7373function LoadFileToStr(const FileName: TFileName): AnsiString;
    7474procedure SearchFiles(AList: TStrings; Dir: string;
    75   FilterMethod: TFilterMethodMethod);
     75  FilterMethod: TFilterMethodMethod = nil);
    7676function GetStringPart(var Text: string; Separator: string): string;
    7777function PosFromIndex(SubStr: string; Text: string;
     
    528528
    529529procedure SearchFiles(AList: TStrings; Dir: string;
    530   FilterMethod: TFilterMethodMethod);
     530  FilterMethod: TFilterMethodMethod = nil);
    531531var
    532532  SR: TSearchRec;
     
    536536    try
    537537      repeat
    538         if (SR.Name = '.') or (SR.Name = '..') or not FilterMethod(SR.Name) or
    539           not FilterMethod(Copy(Dir, 3, Length(Dir)) + SR.Name) then Continue;
     538        if (SR.Name = '.') or (SR.Name = '..') or (Assigned(FilterMethod) and (not FilterMethod(SR.Name) or
     539          not FilterMethod(Copy(Dir, 3, Length(Dir)) + SR.Name))) then Continue;
    540540        AList.Add(Dir + SR.Name);
    541541        if (SR.Attr and faDirectory) <> 0 then
Note: See TracChangeset for help on using the changeset viewer.