LoadChartFromFile

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
beetle
Newbie
Newbie
Posts: 59
Joined: Fri Dec 12, 2003 5:00 am

LoadChartFromFile

Post by beetle » Fri Apr 30, 2004 3:22 pm

Hi there,
I would like to know if the Chart parameter passed in the LoadChartFromFile function is deleted and re-created (with a new) within this function or if it is in the same memory address. It seems to be the same but I am not sure.


Thanks a lot.

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Sat May 01, 2004 7:25 am

Hi.

Not exactly. Only the chart series and tools are freed. Then the object is repopulated with data. Here is the relevant code from TeeStore.pas implementation:

Code: Select all

Procedure LoadChartFromStreamCheck( Var AChart:TCustomChart;
                                    AStream:TStream;
                                    ACheckError:TProcTeeCheckError=nil;
                                    TryReadData:Boolean=True);

    { remove all child Series and Tools }
    AChart.FreeAllSeries;
    AChart.Tools.Clear;
    // ...
Marjan Slatinek,
http://www.steema.com

Gilbert
Newbie
Newbie
Posts: 14
Joined: Thu Jul 10, 2003 4:00 am
Location: Johannesburg

Post by Gilbert » Thu May 13, 2004 2:58 pm

Then, is there a LoadChartFromStream that takes a value parameter? With the reference parameter, I have to first assign my TChart to a TCustomChart before calling the procedure.

Post Reply