Page 1 of 1

BCB RAD 2007 and TeeJPEG

Posted: Fri Oct 23, 2009 7:37 am
by 10547875
Hi!

I have 2 problems preventing me from completing my application.

1. I ave added the Commander to my C++ application (using RAD 2007). I wanted all available exports
so I added:

#pragma link "TeeJPEG"
#pragma link "TeePNG"
#pragma link "TeeGIF"
#pragma link "TeePCX"
#pragma link "TeExport"
#pragma link "TeeVMLCanvas"
#pragma link "TeePSCanvas"
#pragma link "TeePDFCanvas"
#pragma link "TeeSVGCanvas"
#pragma link "TeeXAMLCanvas"
#pragma link "TeeFlexCanvas"

However, when linking, the linker complaints that it can not find the .obj files for the items above... Am I missing something here in terms of settings... Are the files above in a lib file I should link to?

2. The actual chart is simple: X axis is TDateTime and Y is Temperature. I am using a text file which should populate the graph. Both axis are set to automatic. When the text file is generated, the TDateTime part is saved as a double from the VAL member of TDateTime. The file looks like this:

40108.749417 95.000000
40108.749429 95.000000
40108.749441 95.000000
40108.749452 95.000000
40108.749464 95.000000

The SeriesTextSource component used for the read in is set up as:

DecimalSeparator ='.';
SeriesTextSource1->Fields->Clear();
SeriesTextSource1->Series = Series1;
SeriesTextSource1->AddField("X",1);
SeriesTextSource1->AddField("Y",2);
SeriesTextSource1->FieldSeparator = " ";
SeriesTextSource1->HeaderLines = 0;
SeriesTextSource1->Series = Series1;
SeriesTextSource1->FileName = sFileName;
SeriesTextSource1->Active = true;

The problem is: the component throws an exception when reading in the date with the following:

Exception class= EConvertError
ExceptAddr= 0048170E
ExceptionMessage= '40108.749417' is not a valid date and time

What value is your component expecting?

Br, Tim

Re: BCB RAD 2007 and TeeJPEG

Posted: Fri Oct 23, 2009 8:40 am
by 10547875
Hi!

Question (1) already solved. It helps if one uses the rights header files ;-)...

So issue (2) is the main problem right now!

Br, Tim

Re: BCB RAD 2007 and TeeJPEG

Posted: Fri Oct 23, 2009 2:07 pm
by yeray
Hi Tim,

For the second problem I suppose that you've set your series X values to be DateTime before adding your values. But you have doubles in your source that need to be converted to datetimes.
I think that the easiest way to display what you want would be setting your series xvalues to be doubles before your series population and set your series to be datetime after that.

Something like this:

Code: Select all

  series1.XValues.DateTime:=false;
  series1.CheckDataSource;
  series1.XValues.DateTime:=true;