LoadChartFromStream
Posted: Sun Apr 10, 2005 8:44 pm
Hi,
TeeChartPro 7.04, Delphi 7 Pro
I think there is a bug in
the LoadChartFromStream function. I can't get this code to compile:
procedure TForm1.Button11Click(Sender: TObject);
var memstr: tmemoryStream;
begin
memstr := tmemoryStream.create;
saveChartToStream(chart1, memstr, false, true);
showmessage('Chart saved to memstr');
initChart(Chart1); // clear the chart
memstr.position := 0;
// loadChartFromStream(chart1, memstr);
memstr.free;
end;
When I uncomment that "loadChartFromStream(chart1, memstr);" line, I get
error messages like
[Error] Unit1.pas(273): Types of actual and formal var parameters must be
identical
or a variety of other strange messages. And the error line doesn't line up
to where you'd think the error should be. I think what is happening is that
once you load the chart into a stream, somehow delphi thinks the stream is now a chart!
What I am trying to do is save and load teeCharts to and from Advantage database tables. If you have any examples of using SaveChartToStream and LoadChartFromStream with Advantage Database Tables, I'd sure like to see some.
But, how do you get the LoadChartFromStream to work?
Thanks.
pl
TeeChartPro 7.04, Delphi 7 Pro
I think there is a bug in
the LoadChartFromStream function. I can't get this code to compile:
procedure TForm1.Button11Click(Sender: TObject);
var memstr: tmemoryStream;
begin
memstr := tmemoryStream.create;
saveChartToStream(chart1, memstr, false, true);
showmessage('Chart saved to memstr');
initChart(Chart1); // clear the chart
memstr.position := 0;
// loadChartFromStream(chart1, memstr);
memstr.free;
end;
When I uncomment that "loadChartFromStream(chart1, memstr);" line, I get
error messages like
[Error] Unit1.pas(273): Types of actual and formal var parameters must be
identical
or a variety of other strange messages. And the error line doesn't line up
to where you'd think the error should be. I think what is happening is that
once you load the chart into a stream, somehow delphi thinks the stream is now a chart!
What I am trying to do is save and load teeCharts to and from Advantage database tables. If you have any examples of using SaveChartToStream and LoadChartFromStream with Advantage Database Tables, I'd sure like to see some.
But, how do you get the LoadChartFromStream to work?
Thanks.
pl