Board index » cppbuilder » ChartFX 3.0 in BCB 4.0,CloseData method Error

ChartFX 3.0 in BCB 4.0,CloseData method Error

I upgrade my application to BCB 4.0, it use ChartFX 3.0 licence version,
not the one come with BCB , it works fine in BCB 3.0, but in BCB 4.0,
the CloseData method get a access error, but if I dont use CloseData
method , it will not repaint.
 

Re:ChartFX 3.0 in BCB 4.0,CloseData method Error


Victor,

What type of error are you seeing? An Access Violation error or a 'nicely'
handled exception.

I'm not familiar with the ChartFX control itself but I'm involved with the
code exposing OCX methods in the IDE and will be happy to investigate if I
can get a hold of the control.

Regards,

Bruneau.

PS: I'm assuming you re-imported the Control via the Import|ActiveX Control
of C++Builder v4 to have it show up on the palette, right?

Quote
Victor Chen wrote in message <374F40F0.684C9...@163.net>...
>I upgrade my application to BCB 4.0, it use ChartFX 3.0 licence version,
>not the one come with BCB , it works fine in BCB 3.0, but in BCB 4.0,
>the CloseData method get a access error, but if I dont use CloseData
>method , it will not repaint.

Re:ChartFX 3.0 in BCB 4.0,CloseData method Error


I use ChartFx 3.0.350,a release version,it works fine in BCB 3.0.
The error message is
    Access violation at address 004045E5 in module 'project1.exe'.write of
address 006A0000.

this is my program code:
    int i;
    ChartFX1->OpenDataEx(COD_CONSTANTS,3,0);
    for (i=0;i<3;i++)
    {
        ChartFX1->Const[i]=i*15+20;
    }
    ChartFX1->CloseData(COD_CONSTANTS);

and this is the OpenDataEx,CloseData method BCB import from cfx32.ocx. I copy
it from ChartfxLib_OCX.cpp.

TCOMIChartFX __fastcall TChartFX::GetControlInterface(void)
{
  CreateControl();
  return m_OCXIntf;

Quote
};

long __fastcall TChartFX::OpenDataEx(short nType/*[in]*/, long n1/*[in]*/, long
n2/*[in]*/)
{
  return GetControlInterface().OpenDataEx(nType/*[in]*/, n1/*[in]*/,
n2/*[in]*/);

Quote
}

TOLEBOOL __fastcall TChartFX::CloseData(short nType/*[in]*/)
{
  return GetControlInterface().CloseData(nType/*[in]*/);
Quote
}
Jean-Marie Babet wrote:
> Victor,

> What type of error are you seeing? An Access Violation error or a 'nicely'
> handled exception.

> I'm not familiar with the ChartFX control itself but I'm involved with the
> code exposing OCX methods in the IDE and will be happy to investigate if I
> can get a hold of the control.

> Regards,

> Bruneau.

> PS: I'm assuming you re-imported the Control via the Import|ActiveX Control
> of C++Builder v4 to have it show up on the palette, right?

> Victor Chen wrote in message <374F40F0.684C9...@163.net>...
> >I upgrade my application to BCB 4.0, it use ChartFX 3.0 licence version,
> >not the one come with BCB , it works fine in BCB 3.0, but in BCB 4.0,
> >the CloseData method get a access error, but if I dont use CloseData
> >method , it will not repaint.

Re:ChartFX 3.0 in BCB 4.0,CloseData method Error


Did you try to import the control in BCB4 ? I suspect you are using
sources created by importing the control in BCB3.

Alex

Quote
Victor Chen wrote:

[snip]

--
HotSend - portable documents technology
http://www.hotsend.com/
eFax - get your faxes via email - Free !
http://www.efax.com

Re:ChartFX 3.0 in BCB 4.0,CloseData method Error


Yes,I am import the control in BCB 4.0, if I use the source created by
Tlibimp(fixed) in BCB 3.0,it give me many compile errors.
Quote
Alex Bakaev [TeamB] wrote:
> Did you try to import the control in BCB4 ? I suspect you are using
> sources created by importing the control in BCB3.

> Alex

> Victor Chen wrote:
> [snip]

> --
> HotSend - portable documents technology
> http://www.hotsend.com/
> eFax - get your faxes via email - Free !
> http://www.efax.com

Re:ChartFX 3.0 in BCB 4.0,CloseData method Error


Thanks
    I have get reply from ChartFX, it bug of TLIBIMP in BCB 4.0,,this is
their reply:

There is a bug in BCB 4.0 that shows in Chart FX 3.0 when you use methods
that return a BOOLEAN like CloseData.

The workaround that I found is to go directly to the CloseData call as
follows:

    TOLEBOOL b;
    ChartFX1->GetControlInterface()->CloseData(YOURCOD,&b);

In order to be able to do this, you need to make GetControlInterface
public
in ChartfxLib_OCX.h.

Quote
Victor Chen wrote:
> Yes,I am import the control in BCB 4.0, if I use the source created by
> Tlibimp(fixed) in BCB 3.0,it give me many compile errors.

> Alex Bakaev [TeamB] wrote:

> > Did you try to import the control in BCB4 ? I suspect you are using
> > sources created by importing the control in BCB3.

> > Alex

> > Victor Chen wrote:
> > [snip]

> > --
> > HotSend - portable documents technology
> > http://www.hotsend.com/
> > eFax - get your faxes via email - Free !
> > http://www.efax.com

Re:ChartFX 3.0 in BCB 4.0,CloseData method Error


Victor,

I suggest you submit your findings, togethre with a small sample to
Borland via bug submission form off of www.borland.com
Thanx,
Alex

Quote
Victor Chen wrote:

[snip]

--
HotSend - portable documents technology
http://www.hotsend.com/
eFax - get your faxes via email - Free !
http://www.efax.com

Other Threads