Changeset 37


Ignore:
Timestamp:
Nov 25, 2021, 3:20:15 PM (3 years ago)
Author:
chronos
Message:
  • Fixed: Build under older FPC.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UContact.pas

    r35 r37  
    3737
    3838  TContactFields = class(TFPGObjectList<TContactField>)
    39     function AddNew(Name: string; Groups: TStringArray; Title: string; Index: TContactFieldIndex; DataType:
     39    function AddNew(Name: string; Groups: array of string; Title: string; Index: TContactFieldIndex; DataType:
    4040      TDataType; ValueIndex: Integer = -1): TContactField;
    4141    function GetByIndex(Index: TContactFieldIndex): TContactField;
     
    348348{ TContactFields }
    349349
    350 function TContactFields.AddNew(Name: string; Groups: TStringArray; Title: string; Index: TContactFieldIndex;
     350function TContactFields.AddNew(Name: string; Groups: array of string; Title: string; Index: TContactFieldIndex;
    351351  DataType: TDataType; ValueIndex: Integer = -1): TContactField;
     352var
     353  I: Integer;
    352354begin
    353355  Result := TContactField.Create;
    354356  Result.SysName := Name;
    355   Result.Groups := Groups;
     357  SetLength(Result.Groups, Length(Groups));
     358  for I := 0 to Length(Groups) - 1 do
     359    Result.Groups[I] := Groups[I];
    356360  Result.Title := Title;
    357361  Result.Index := Index;
Note: See TracChangeset for help on using the changeset viewer.