Page 1 of 1

TeeChart 6 & 7 - Printpreview causes exception after clo

Posted: Wed Mar 10, 2004 8:04 am
by 8578912
Hello,

if i make a printpreview of a Chart with the ChartPreviewer
and close the preview of my chart it raises an exception 'Index of the list is over maximum(0)'
(translated from german, orig. 'Der Index der Liste ueberschreitet das Maximum(0)).

I've tried it with TeeChart6 and TeeChart 7 on several fresh installed systems with the same results.
The Problem only exists if you build the project without runtime-packages. If you build the project with runtime-packages activated it works without problems.

Environment:
BCB 5, all SP's Teechart 6/7

I'Ve already deleted all references to old TeeCharts (*.objs, *.lib,etc).

Any help would be greatly appreciated.

Thanks.

Posted: Wed Mar 10, 2004 8:22 pm
by Marjan
Hi.

Which operating system are you using ? Also, do you have at least one printer installed on your system ? I've tried to replicate the problem you're having using TC 6.01 and BCB5 but everything worked just fine. If possible, please send us (to marjan@steema.com email address) small sample application (sources only, with "Build with runtime..." disabled) which shows this problem.

Posted: Thu Mar 11, 2004 8:08 am
by 8578912
Actually i've tested this on machines with Windows XP SP1.
Most of them had several, different printers installed.

To replicate the Problem you only have to drop a TChart and a ChartPreviewer Component to the form,
tie the Chartpreviewer to the Chart and place a button with "ChartPreviewer1->Execute();" into the on Click-Event.


I've also searched the newsgroups and found
Message-ID: <TtFdyY23DHA.2808@TEEPC.Steema.local>
which describes the same error:

Message-ID: <TtFdyY23DHA.2808@TEEPC.Steema.local>
Newsgroups: steema.public.teechart6.cppbuilder
Path: TEEPC.Steema.local
X-Old-Xref: TEEPC.Steema.local steema.public.teechart6.cppbuilder:169
NNTP-Posting-Host: 194.171.5.81

Hi,

Running the code below. When clicking on the close butting I get an
exception:
List Index out of bounds(0).
I'm using TchartPro 6.01


Regards,

Bart

ChartPreviewer->Chart = dataChart;
ChartPreviewer->Title = asNewStr;
try
{
ChartPreviewer->Execute();
}
catch (Exception &exception)
{
ShowMessage(exception.Message);
}

Posted: Mon Mar 15, 2004 2:39 pm
by 8578912
Any news ?

Posted: Tue Mar 16, 2004 6:04 am
by Marjan
Hi, Mike.

I've tried running your application and got the same (list index out of ...) error. Then I prepared new application (using TC 7.0) with BCB6 and it also worked fine. Finally, I did the same with BCB5 and I also got good results (I sent test app to your email address). Can you run it on your machine and report back to me if it works ? Thanks.

BTW, are you using the "Build with the runtime packages" option ? Try changing this and then check if it works then.

I am facing the same issue here....

Posted: Tue May 23, 2006 1:34 pm
by 8575902
Hello Marjan and Mike.

I noticed that this is a quite an old thread, but it popped out while I was searcing an answer to my problem.

My problem is exactly the same:

Environment: BC++ 6.0 std + TC 6.01

1. I create a new project and drop a TeePreview Component on it.
2. Run
3. Close -> Application chrases.

I noticed that this happens ONLY while CodeGuard is on. The actual CG message does not help. If I turn my CG of and run that app again, it closes nicely.

Since I have a version with source code I tried to find out what is cousing this.... I had my eyes on this part:

function TTeePanelsList.Get(Index: Integer): TCustomTeePanel;
begin
result:=TCustomTeePanel(inherited Items[Index]);
end;

it did not had any safety checks while getting the index. Unfortunatelly I was not able to rebuild that package after modifying it. I just got a pile of unresolved externals while linking....

I could really use some help here.

- janne -

Posted: Thu May 25, 2006 11:24 am
by Pep
Hi Janne,

this problem has been fixed in the latest TeeChart Pro v7. I've just tried here using the v7.07 and it does not happens. Would you be so kind to check if it works fine for you ? If you only have the TeeChart v6 you can test it first with the Eval version of the Teechart Pro v7.07 available on our web site.

Posted: Fri May 26, 2006 7:32 am
by 8575902
Thanks Josep

It seems to be fixed in the latest version. It did not happen anymore. Hmm... It seems to be the time to get an update. ;-) Good for You.

Is there a way to upgrade our current licency or does every major update has a full price tag for existing customers ?

Posted: Fri May 26, 2006 7:58 am
by narcis
Hi Janne,

We have special upgrade prices for existing customers as you can see here. For other sales inquiries please contact our Sales Dept. at sales@steema.com.

Posted: Fri May 26, 2006 8:01 am
by 8575902
Thanks.... I will get the upgrade. btw. Nice forum you have here. Very usefull and very active. Thank you for that!