Ignore:
Timestamp:
Jan 18, 2022, 10:45:33 PM (3 years ago)
Author:
chronos
Message:
  • Modified: Updated to build under Lazarus 2.2.0.
  • Modified: Updated Common package to version 0.9.
File:
1 edited

Legend:

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

    r308 r313  
    11unit ULanguages;
    22
    3 {$mode objfpc}{$H+}
     3{$mode delphi}{$H+}
    44
    55interface
    66
    77uses
    8   Classes, SysUtils, Contnrs;
     8  Classes, SysUtils, fgl;
    99
    1010type
     
    1515  end;
    1616
    17   { TLanguageList }
    18 
    19   TLanguageList = class(TObjectList)
     17  { TLanguages }
     18
     19  TLanguages = class(TFPGObjectList<TLanguage>)
    2020    function SearchByCode(ACode: string): TLanguage;
    2121    procedure AddNew(Code: string; Name: string);
    22     constructor Create;
     22    constructor Create(FreeObjects: Boolean = True);
    2323  end;
    2424
     
    223223
    224224
    225 { TLanguageList }
    226 
    227 function TLanguageList.SearchByCode(ACode: string): TLanguage;
     225{ TLanguages }
     226
     227function TLanguages.SearchByCode(ACode: string): TLanguage;
    228228var
    229229  I: Integer;
     
    235235end;
    236236
    237 procedure TLanguageList.AddNew(Code: string; Name: string);
     237procedure TLanguages.AddNew(Code: string; Name: string);
    238238var
    239239  NewItem: TLanguage;
     
    245245end;
    246246
    247 constructor TLanguageList.Create;
     247constructor TLanguages.Create(FreeObjects: Boolean);
    248248begin
    249   inherited Create;
     249  inherited;
    250250  AddNew('', SLangAuto);
    251251  AddNew('aa', SLang_aa);
Note: See TracChangeset for help on using the changeset viewer.