Not sure if this is possible,
I have an object that inherits from TPersistant. This works as a custom class that can be edited in the property inspector. Normal stuff.
The question is it possible to have an ARRAY of these object and still have the design time property inspector work? I can get it to compile just fine but will crash Lazarus when I install the component (even with a fresh project not yet using the component, as soon as I add it to the form it crashes the works)
// lots of code removed
TDTCustomThemedGauge = class(TDTBaseAnalogDevice)
private
FLedArray: Array[0..7] of TDTRangeCheckLedSettings; // want to have an array of these in the property inspector at design time, this inherits from TPersistent
...
Procedure SetLedArray(AIndex: Integer; AValue: TDTRangeCheckLedSettings);
Function GetLedArray(AIndex: Integer): TDTRangeCheckLedSettings;
{ Private declarations }
protected
{ Protected declarations }
Property LedArray[AIndex: Integer]:TDTRangeCheckLedSettings Read GetLedArray Write SetLedArray;
public
{ Public declarations }
...
end;
...
Procedure TDTCustomThemedGauge.SetLedArray(AIndex:Integer; AValue: TDTRangeCheckLedSettings);
begin
FLedArray[AIndex] := AValue; // OK for a descendant of a TPersistent or have to do it member var by member var??
end;
Function TDTCustomThemedGauge.GetLedArray(AIndex:Integer): TDTRangeCheckLedSettings;
begin
Result := FLedArray[AIndex];
end;
...
Can something like this be done or is it out of scope for the way the design time property inspector works.
Sandy