Hi
I have updated from version 6 to version 7 for c++ builder 6 and now my code gives me AV's
example: create a serie at runtime and set Pointer->Visible to false:
TPoint3DSeries *Serie = new TPoint3DSeries(Chart);
Serie->Pointer->Visible = false; /// <- this line give me an AV
Serie->YValues->Order = loNone; ///<- and this one
and so on.
But as I can tell this code should run without any problems, so can
anyone please tell me what I'm duing wrong.
Thanks Torben
Creating series at runtime
Hi, Torben.
The code looks fine to me and I was also able to run in on my machine here. I suspect the problem is your BCB project is still referencing old bpi/lib/obj files. There are several topics in this forum about "old files" problem. Just type the keywords "bpi old" at forum search form and check the results.
The code looks fine to me and I was also able to run in on my machine here. I suspect the problem is your BCB project is still referencing old bpi/lib/obj files. There are several topics in this forum about "old files" problem. Just type the keywords "bpi old" at forum search form and check the results.
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
-
- Newbie
- Posts: 4
- Joined: Fri Sep 10, 2004 4:00 am
Hi Marjan
Yes a search and kill did the job, but that has just given me a new problem
I have a custom chart derived from TChart:
*.h file
class PACKAGE TEChart : public TChart
*.cpp file
static inline void ValidCtrCheck(TEChart *)
{
new TEChart(NULL);
}
//---------------------------------------------------------------------------
__fastcall TEChart::TEChart(TComponent* Owner)
: TChart(Owner)
{
}
//---------------------------------------------------------------------------
namespace Echart
{
void __fastcall PACKAGE Register()
{
TComponentClass classes[1] = {__classid(TEChart)};
RegisterComponents("EqPack", classes, 0);
}
}
//---------------------------------------------------------------------------
But when I try to compile it I get these errors:
[C++ Error] EChart.cpp(16): E2352 Cannot create instance of abstract class 'TEChart'
[C++ Error] EChart.cpp(16): E2353 Class 'TEChart' is abstract because of '_fastcall TCustomAxisPanel::IsFreeSeriesColor(TColor,bool,TChartSeries *) = 0'
I also have a component derived from TTeeCommander:
*.h file
#include "TeeComma.hpp"
class PACKAGE TETeecommander : public TTeeCommander
{
void __fastcall B_Load_Click(TObject *Sender);
}
*.cpp file
Where I add 1 buttom of my own:
B_Load_ = this->CreateButton(310, B_Load_Click, "Open", "", 0);
That gives me the error:
[C++ Error] ETeecommander.cpp(27): E2285 Could not find a match for 'TCustomTeeCommander::CreateButton(int,void,char *,char *,int)'
As far as I can tell CreateButton is defined in TeeComma.hpp
Thanks Torben
Yes a search and kill did the job, but that has just given me a new problem
I have a custom chart derived from TChart:
*.h file
class PACKAGE TEChart : public TChart
*.cpp file
static inline void ValidCtrCheck(TEChart *)
{
new TEChart(NULL);
}
//---------------------------------------------------------------------------
__fastcall TEChart::TEChart(TComponent* Owner)
: TChart(Owner)
{
}
//---------------------------------------------------------------------------
namespace Echart
{
void __fastcall PACKAGE Register()
{
TComponentClass classes[1] = {__classid(TEChart)};
RegisterComponents("EqPack", classes, 0);
}
}
//---------------------------------------------------------------------------
But when I try to compile it I get these errors:
[C++ Error] EChart.cpp(16): E2352 Cannot create instance of abstract class 'TEChart'
[C++ Error] EChart.cpp(16): E2353 Class 'TEChart' is abstract because of '_fastcall TCustomAxisPanel::IsFreeSeriesColor(TColor,bool,TChartSeries *) = 0'
I also have a component derived from TTeeCommander:
*.h file
#include "TeeComma.hpp"
class PACKAGE TETeecommander : public TTeeCommander
{
void __fastcall B_Load_Click(TObject *Sender);
}
*.cpp file
Where I add 1 buttom of my own:
B_Load_ = this->CreateButton(310, B_Load_Click, "Open", "", 0);
That gives me the error:
[C++ Error] ETeecommander.cpp(27): E2285 Could not find a match for 'TCustomTeeCommander::CreateButton(int,void,char *,char *,int)'
As far as I can tell CreateButton is defined in TeeComma.hpp
Thanks Torben