TeeChart2014 OCX - Backwards compatibility

TeeChart for ActiveX, COM and ASP
Micro
Newbie
Newbie
Posts: 27
Joined: Thu Feb 20, 2014 12:00 am

TeeChart2014 OCX - Backwards compatibility

Post by Micro » Mon Jun 30, 2014 9:49 am

There is a product which uses TeeChart2012.ocx. I have upgraded it to TeeChart2014.ocx and I have changed the .h and .cpp files for the new release.

What about the old releases which are using TeeChart2012.ocx? When using TeeChart2014.ocx I'm getting a message error "Member not found."
Attachments
MessageError_MemeberNotFound.PNG
MessageError_MemeberNotFound.PNG (6.83 KiB) Viewed 34904 times

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TeeChart2014 OCX - Backwards compatibility

Post by Yeray » Tue Jul 01, 2014 9:53 am

Hello,

Do you know what property that was working with the 2012' ocx is giving this error with the actual version?
Could you please arrange a simple example project we can run as-is to reproduce the problem here?

Thanks in advance.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Micro
Newbie
Newbie
Posts: 27
Joined: Thu Feb 20, 2014 12:00 am

Re: TeeChart2014 OCX - Backwards compatibility

Post by Micro » Tue Jul 01, 2014 3:47 pm

The problems occured in this methods:

tChart.GetWalls().GetBack().GetPen(); - at GetPen() we get the message
chartSeries.GetAsLine().GetLinePen(); - at GetLinePen() we get the message
chartSeries.GetAsLine().SetStairs(TRUE); - at SetStairs() we get the message
chartSeries.GetAsLine().SetInvertedStairs(TRUE); - at SetInvertedStairs() we get the message

I will try to make a simple project.

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TeeChart2014 OCX - Backwards compatibility

Post by Yeray » Wed Jul 02, 2014 10:22 am

Hello,
Micro wrote:The problems occured in this methods:

tChart.GetWalls().GetBack().GetPen(); - at GetPen() we get the message
chartSeries.GetAsLine().GetLinePen(); - at GetLinePen() we get the message
chartSeries.GetAsLine().SetStairs(TRUE); - at SetStairs() we get the message
chartSeries.GetAsLine().SetInvertedStairs(TRUE); - at SetInvertedStairs() we get the message
I've tested all these properties in a simple VB6 application and both TeeChart v2014.0.0.0 and v2014.0.0.1 and found no problem with it.

Code: Select all

  TChart1.Aspect.View3D = False
  TChart1.Legend.Visible = False
 
  TChart1.Walls.Back.Pen.Color = vbRed
  
  TChart1.AddSeries scLine
  TChart1.Series(0).FillSampleValues 5
  TChart1.Series(0).asLine.Pointer.Visible = True
  TChart1.Series(0).asLine.Stairs = True
  TChart1.Series(0).asLine.InvertedStairs = True
Are you using v2014.0.0.0 or v2014.0.0.1?
Micro wrote:I will try to make a simple project.
Yes, that would be helpful.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Micro
Newbie
Newbie
Posts: 27
Joined: Thu Feb 20, 2014 12:00 am

Re: TeeChart2014 OCX - Backwards compatibility

Post by Micro » Fri Jul 04, 2014 9:12 am

I attached a demo project. Just click ok button and 4 jpg graphs should be generated. With 2012 is working but with 2014 I got the "Member not found" message box.
I'm using the 2014.0.0.0 version.

Micro
Newbie
Newbie
Posts: 27
Joined: Thu Feb 20, 2014 12:00 am

Re: TeeChart2014 OCX - Backwards compatibility

Post by Micro » Fri Jul 04, 2014 9:21 am

Extract zip files in the same directory.
Attachments
TChartDemo2.zip
(176.03 KiB) Downloaded 1424 times
TChartDemo1.zip
(381.3 KiB) Downloaded 1450 times
TChartDemo.zip
(132.57 KiB) Downloaded 1516 times

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TeeChart2014 OCX - Backwards compatibility

Post by Yeray » Fri Jul 04, 2014 1:43 pm

Hello,

These are the calls that are crashing to me with your project and TeeChart ActiveX v2014.0.0.1:

Code: Select all

rTChart.GetWalls().GetBack().GetPen().SetVisible(FALSE);
ChartSeries.GetAsLine().GetLinePen().SetStyle(0);
ChartSeries.GetAsLine().GetLinePen().SetWidth(2);
ChartSeries.GetAsLine().SetStairs(TRUE);
ChartSeries.GetAsLine().SetInvertedStairs(TRUE);
We're investigating what's the cause of the problem and we'll be back to you asap.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TeeChart2014 OCX - Backwards compatibility

Post by Yeray » Mon Jul 07, 2014 2:08 pm

Hello,
Yeray wrote:These are the calls that are crashing to me with your project and TeeChart ActiveX v2014.0.0.1:

Code: Select all

rTChart.GetWalls().GetBack().GetPen().SetVisible(FALSE);
ChartSeries.GetAsLine().GetLinePen().SetStyle(0);
ChartSeries.GetAsLine().GetLinePen().SetWidth(2);
ChartSeries.GetAsLine().SetStairs(TRUE);
ChartSeries.GetAsLine().SetInvertedStairs(TRUE);
We're investigating what's the cause of the problem and we'll be back to you asap.
I have problems moving your application to use TeeChart v2014.0.0.1. Have you tried it?
However, I can use the lines of code above in a simple VC++ application in Visual Studio 2010 with both TeeChart v2014.0.0.0 and TeeChart v2014.0.0.1.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Micro
Newbie
Newbie
Posts: 27
Joined: Thu Feb 20, 2014 12:00 am

Re: TeeChart2014 OCX - Backwards compatibility

Post by Micro » Fri Jul 11, 2014 2:00 pm

You are using also the files from TChart_2012 folder?

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TeeChart2014 OCX - Backwards compatibility

Post by Yeray » Fri Jul 11, 2014 3:56 pm

Hello,
Micro wrote:You are using also the files from TChart_2012 folder?
Your application builds fine and if I register TeeChart v2014.0.0.1 the about box shows the correct number:

Code: Select all

rTChart.AboutBox();
And I still reproduce the error with VS2012. Then, I try to make sure the headers are fine, overriding the one in TChart_2012 with the ones provided with the v2014.0.0.1 installer and then the application doesn't build any more.
That's why I tried it in a new simple VC++ application and VS2010. Could you please try with a new simple example project using TeeChart v2014.0.0.1 from scratch?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Micro
Newbie
Newbie
Posts: 27
Joined: Thu Feb 20, 2014 12:00 am

Re: TeeChart2014 OCX - Backwards compatibility

Post by Micro » Mon Jul 14, 2014 3:06 pm

Hi,

I will start from the beginning.

There is a product which uses TeeChart 2012 using the .h and .cpp files provided in the installation folder and copied them in the TChart_2012 folder. This product is delivered to the customer.
For the new release of our product we want to update to TeeChart 2014. I fixed the code. I replaced all the files from TChart_2012 with the files provided in the installation folder of TeeChart 2014 and its working fine.

And here comes the problem. When I have both versions installed on the same computer the new release is working using TeeChart 2014. But the old product is not working with the new TeeChart 2014. The old product generates the "Member not found!" error. Because the old product is already delivered to the customer I cannot make any changes in the code.

One place where we get this error is in:
rTChart.GetWalls().GetBack().GetPen();
In wall.cpp we have the followings:
• TeeChart 2012
CPen1 CWall::GetPen()
{
LPDISPATCH pDispatch;
InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&pDispatch, NULL);
return CPen1(pDispatch);
}

• TeeChart 2014
CPen1 CWall::GetPen()
{
LPDISPATCH pDispatch;
InvokeHelper(0xcc, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&pDispatch, NULL);
return CPen1(pDispatch);
}


As we can see there is a difference in InvokeHelper method, “0x3” vs “0xcc”. May be this is the error generator.

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TeeChart2014 OCX - Backwards compatibility

Post by Yeray » Tue Jul 15, 2014 12:07 pm

Hi,
Micro wrote:And here comes the problem. When I have both versions installed on the same computer the new release is working using TeeChart 2014. But the old product is not working with the new TeeChart 2014. The old product generates the "Member not found!" error. Because the old product is already delivered to the customer I cannot make any changes in the code.
I'm not sure to understand if the v2014 ocx has been registered in the customer machine or not. However, I understand some way or another you can't synchronize this new ocx with the corresponding headers in the customer machine.
The headers are extracted from the ocx and included in the installer so you can rebuild your applications with the headers and ocx matching. I don't think it's possible to upgrade the TeeChart version without recompiling the application referencing the headers for that concrete version of the ocx.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Micro
Newbie
Newbie
Posts: 27
Joined: Thu Feb 20, 2014 12:00 am

Re: TeeChart2014 OCX - Backwards compatibility

Post by Micro » Wed Jul 16, 2014 2:43 pm

Last time when we did an upgrade from version 5 to 2012 we didn't had any problems with the old releases of our product to use the new TeeChart2012 ActiveX control, which previously were using TeeChart5.

If we are looking at tchart.cpp and compare the 2 versions, we can see that all the methods have the same dwDispID parameter in the InvokeHelper method call. But for the wall.cpp these values are change for almost all methods. I still think that this generates the problem. If those values would be the same in 2014 as in 2012 TeeChart ActiveX control, it would work.

We cannot rebuild old versions of our products and deliver them to our customers. That's not an option for us.

Or, maybe, if the new TeeChart2014 is registered with an other CLSID, that will also work for us.

Thanks

Pep
Site Admin
Site Admin
Posts: 3301
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Re: TeeChart2014 OCX - Backwards compatibility

Post by Pep » Fri Jul 18, 2014 12:08 pm

Hello,

the problem is that several changes have been made into the TeeChart interfaces on this major release (for example, as you said, at the walls part). It's not possible for us to prepare a 2014 without these changes. The only way I can think of would be to rebuild the app with the latest TeeChart ocx version or use an old ocx for this specific application (in the case you don't want to rebuild it).

Micro
Newbie
Newbie
Posts: 27
Joined: Thu Feb 20, 2014 12:00 am

Re: TeeChart2014 OCX - Backwards compatibility

Post by Micro » Mon Jul 21, 2014 11:56 am

It is ok to use the old ocx for the old product. But for the new product we need the new ocx (2014) registerred on the same machine. Since the old and the new ocx version share the same CLSID it is not possible to have both OCX versions registerred on the same machine.

An ActiveX control must be backward compatible by design. If this is not guaranteed you must register it as a different/new component with new CLSID.

Apparently the 2014 OCX is not backward compatible to earlier versions, so either you use a different CLSID or make the 2014 OCX backward compatible.

If you are not considering one of the two options, you force use to stay on version 2012, which is a reason for us not to pay any maintenance fee any longer.

Post Reply