Note that you can set/get several properties wih a single setter+getter pair by adding an
index to your properties; only drawback is that all the properties must have the same type. For example:
TAccessData = class(TAnotherClass)
private
FData: TData;
function GetField(Index : Integer): String;
Procedure SetField(Index: Integer; Value: String);
published
property ID: String index 1 read GetField write SetField;
property Title: String index 2 read GetField write SetField;
end;
{ later, in the implementation: }
function TAccessData.GetField(Index : Integer): String;
begin
case Index of
1: Result := FData.FID;
2: Result := FData.FTitle;
end;
end;
Procedure TAccessData.SetField(Index: Integer; Value: String);
begin
case Index of
1: FData.FID := Value;
2: FData.FTitle := Value;
end;
end;
It has the small advantage that if you later add more fields (of the same type) you have only a few, sensible places to modify. And IMHO it's more elegant than not