I have TeeChart Pro v2010 VCL version installed
I am taking a TChart from an old project using old version of C++ Builder Version 5, and moving it to C++ Builder 2009. The code worked in the old version. When I bring it to the new version I get a compiler error.
// Here's the method in my class
void __fastcall TGraphForm::OnGetMarkText_G(TChartSeries* Sender, int ValueIndex, AnsiString &MarkText)
{
if(Sender->XValues->Value[ValueIndex] > 1.0)
Sender->Marks->BackColor = clRed;
else
Sender->Marks->BackColor = Sender->SeriesColor;
}
// this is a code snippet from another part of the code
// pS is declared as a TChartSeries *
TChartSeries *pS
// later in the code
pS->OnGetMarkText = OnGetMarkText_G;
Here's the compiler error I get:
[BCC32 Error] Graph.cpp(195): E2034 Cannot convert 'void (_fastcall * (_closure )(TChartSeries *,int,AnsiString &))(TChartSeries *,int,AnsiString &)' to 'TSeriesOnGetMarkText'
Any ideas what the problem could be?
TChartSeries OnGetMarkText causing compiler error
Re: TChartSeries OnGetMarkText causing compiler error
Hi Mary,
Try changing this part of the event signature:
for this:
Try changing this part of the event signature:
Code: Select all
AnsiString &MarkText
Code: Select all
UnicodeString &MarkText
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |