Create constructor never called in the TRVGraphicItemInfo descendants
Posted: Sat Jan 03, 2026 4:19 pm
I have the following problem. I am creating a descendant of TRVGraphicItemInfo using CreateEx constructor, but the overridden Create constructor is never called. As a result, I cannot initialize additional properties:
Perhaps “inherited” is not needed in the TRVGraphicItemInfo.CreateEx constructor? Please check.
Code: Select all
TRVChartItemInfo = class(TRVGraphicItemInfo);
constructor TRVChartItemInfo.Create(ARVData: TPersistent);
begin
inherited Create(ARVData);
StyleNo := rvsChartObject; // <-- this code never executed!
end;
{ ... create instance ... }
class function TRVChartItemInfo.InsertTo(RVData: TCustomRVData; ChartData: TStrings): TRVChartItemInfo;
begin
Result := TRVChartItemInfo.CreateEx(RVData, TBitmap.Create(500, 400), TRVVAlign.rvvaBaseline);
{ .. }
end;