bcb6 703 TNearestTool::GetNearest not found.

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Jon Engelbert
Newbie
Newbie
Posts: 3
Joined: Fri Nov 15, 2002 12:00 am
Location: Ann Arbor, MI
Contact:

bcb6 703 TNearestTool::GetNearest not found.

Post by Jon Engelbert » Thu Mar 17, 2005 5:46 pm

I'm using C++ builder 6 with teechart 7.0.3. (I will upgrade to 7.0.4 later today.)

I'm trying to use the TNearestTool::GetNearestPoint method,
and the compiler gives me the following error:
[C++ Error] unit2.cpp(6326): E2285 Could not find a match for 'TNearestTool::GetNearestPoint(TChartSeries *,int,int)'
[C++ Error] unit2.cpp(6389): E2285 Could not find a match for 'TNearestTool::GetNearestPoint(TChartSeries *,int,int,int)'

You can see that I tried matching both forms of the function (with and without the final bool).
I checked the header file, and it looks OK...
What's going on here?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Mar 18, 2005 10:38 am

Hi Jon,

That may be because you have to define the metaclass like:

Code: Select all

ChartTool1->GetNearestPoint(__classid(TChartSeries),Chart1->Series[0],X,Y);
If you already know the series type then you'd better use it, i.e.: TLineSeries.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Jon Engelbert
Newbie
Newbie
Posts: 4
Joined: Wed Sep 29, 2004 4:00 am
Location: Ann Arbor, MI
Contact:

Post by Jon Engelbert » Mon Mar 21, 2005 8:02 pm

Thanks Nancy, using the graph type as the initial parameter worked.

The description in the help file was wrong, though.

function GetNearestPoint(Series: TChartSeries; x, y: Integer): Integer; overload;

The header file, obviously, had it right.

Post Reply