goodmanrAy
Programmer
Have a problem writing to an array of records which is a property of an object.
type ArrayRecord = record
A : integer
B : string
C : Real
type SomeObject = class(Tobject)
private
FArray : array of TArrayRecord
function GetItem(index : integer)
procedure SetItem(index : integer; value : TArrayrecord)
public
property Array[index : integer] : TArrayrecord read Getitem write setitem
Function GetItem(Index : integer):TArrayrecord;
begin
result := FArray[index]
end
in my code
somevariable := Array[1].A ;
this works fine
But I don't know how to set a value in Array??
Can anyone help??
i.e.
Array[1].A := 1
type ArrayRecord = record
A : integer
B : string
C : Real
type SomeObject = class(Tobject)
private
FArray : array of TArrayRecord
function GetItem(index : integer)
procedure SetItem(index : integer; value : TArrayrecord)
public
property Array[index : integer] : TArrayrecord read Getitem write setitem
Function GetItem(Index : integer):TArrayrecord;
begin
result := FArray[index]
end
in my code
somevariable := Array[1].A ;
this works fine
But I don't know how to set a value in Array??
Can anyone help??
i.e.
Array[1].A := 1