Maxim Ganetsky wroteThe basic method to solve this is to move these assignments (or assign
these values for a second time) to a later stage, e.g. OnCreate event
of the GUI designer form.
I could solve it in the meantime by modifying the RegisterXXXX procedures used throughout TAChart to store the pointer to the resource string instead of the string directly. Hmmh, it does break backward-compatibility, but I bet nobody has ever written his own chart series so far... Let me see who complains in the forum
--- code begin ---
type
PStr = ^String;
procedure RegisterSeriesClass(
ASeriesClass: TSeriesClass; const ACaption: PStr); // ACaption was a
string before...
begin
if SeriesClassRegistry.IndexOfClass(ASeriesClass) < 0 then
SeriesClassRegistry.Add(TClassRegistryItem.Create(ASeriesClass,
ACaption));
end;
...
resourcestring
rsLineSeries = 'Line series';
initalization
RegisterSeriesClass(TLineSeries, @rsLineSeries);
---- code end ---