Published property cannot be of type ARRAY
Hello,
I'm converting a program from Delphi3 to Delphi6.
I'm getting following error message : "Published property 'Message' cannot
be of type ARRAY"
The error occurs on following line :
property Message2[index: integer]: TMsgString read GetMessage write
SetMessage;
Why does this compile in Delphi3 and not in Delphi6?
What can I do to avoid this error?
Tnx in advance
Bart
PS : class declaration is included
TMsgParameter = class(TIntegerParameter)
private
FMultiDisplay: Boolean;
FDisplayTime: Integer;
FMultiColor: Boolean;
FTicks: Longint;
FCurMsg: Integer;
FMessages: array[0..Pred(SizeOf(Longint)*8)] of TMsgString;
function GetTrendLoggable: Boolean; override;
procedure OnTimer;
procedure SetMessage(Index: integer; value: TMsgString);
function GetMessage(Index: integer): TMsgString;
procedure SetCurMsg(Value: integer);
procedure SetMultiDisplay(Value: Boolean);
procedure SetMultiColor(Value: Boolean);
protected
procedure AddProperties( L: TStringList); override;
public
constructor Create(AOwner: TComponent); override;
function GetText: string; override;
procedure Read(Sender: TObject); override;
procedure Print( Lines: TStrings); override;
function SaveToOutLine( Outline: TOutline; ALevel: longint): Longint;
override;
constructor LoadFromOutLine( AOwner: TComponent; Outline: TOutline;
ALevel: Longint); override;
published
property MultiDisplay: boolean read FMultiDisplay write FMultiDisplay
default False;
property MultiColor: boolean read FMultiColor write SetMultiColor
default False;
property DisplayTime: integer read FDisplayTime write FDisplayTime
default pcMsgParamDisplayTime;
property Message[index: integer]: TMsgString read GetMessage write
SetMessage;
property CurMsg: integer read FCurMsg write SetCurMsg default 0;
end;
{***************************************************************************
***}
{* SetMessage
*}
{***************************************************************************
***}
procedure TMsgParameter.SetMessage;
begin
if (Index >= Low(FMessages)) and (Index <= High(FMessages)) and
(FMessages[Index] <> Value) then
begin
FMessages[Index] := Value;
Invalidate;
end;
end;
{***************************************************************************
***}
{* GetMessage
*}
{***************************************************************************
***}
function TMsgParameter.GetMessage;
begin
if (Index >= Low(FMessages)) and (Index <= High(FMessages))
then Result := FMessages[Index]
else Result := ''
end;