I am trying to pass an array of Strings and two arrays from TAlignment to three properties (published). But I'm having the following error (which is the same for all three properties):
[dcc32 Error] uCad.pas (31): E2188 Published property 'ColumnTitleName' can not be of type ARRAY ".
The code is below:
type
TCad = class
private
FColumnTitleName: array of String;
FColumnTitleAlign: array of TAlignment;
FColumnAlign: array of TAlignment;
function GetColumnAlign(index: Integer): TAlignment;
function GetColumnTitleAlign(index: Integer): TAlignment;
function GetColumnTitleName(index: Integer): String;
public
published
property ColumnTitleName[index: Integer]: String read GetColumnTitleName;
property ColumnTitleAlign[index: Integer]: TAlignment read GetColumnTitleAlign;
property ColumnAlign[index: Integer]: TAlignment read GetColumnAlign;
end;
implementation
function TCad.GetColumnAlign(index: Integer): TAlignment;
begin
Result := FColumnAlign[index];
end;
function TCad.GetColumnTitleAlign(index: Integer): TAlignment;
begin
Result := FColumnTitleAlign[index];
end;
function TCad.GetColumnTitleName(index: Integer): String;
begin
Result := FColumnTitleName[index];
end;
end.
Does anyone know where I'm going wrong?
Thank you.