Page 1 of 2

CursorTool problem since upgrade to D2007/TChart 8

Posted: Tue Dec 02, 2008 2:00 pm
by 10551030
Hi,

Just upgraded both Delphi & TChart. Now every time I reopen the project I get an error: class TCursorTool not found... and I have to recreate my cursors. TeeTools is included early in the uses list. Everything was fine with D2007/TChart7.

Posted: Tue Dec 02, 2008 4:33 pm
by narcis
Hi marc_x,

You should check that your Delphi 2007's Search Path list at Project -> Options -> Directories/Conditionals contain TeeChart v8's "Bin" and "Lib" folders.

More info

Posted: Tue Dec 02, 2008 5:37 pm
by 10551030
Hi,

Adding the folders to the path did not change the problem... actually I have tried many ways to open the project... when loaded along the IDE (Autosaved desktop) it always fails... loading the IDE then the project sometimes works...

Wish I had more clues, if I get any I'll let you know

Thanks

Posted: Tue Dec 02, 2008 5:43 pm
by narcis
Hi marc_x,

Could you please send us a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.

File uploaded

Posted: Tue Dec 02, 2008 6:35 pm
by 10551030
Hi,

Just uploaded a project.

I added a comment in attached text file

Thanks

More...

Posted: Tue Dec 02, 2008 9:12 pm
by 10551030
Seems if I load the project after a project that has a TChart the error does not occur... as if in order to load properly with the cursors, the chart has to be loaded correctly once.

Posted: Wed Dec 03, 2008 9:03 am
by narcis
Hi marc_x,

Thanks for sending the sample project. It works fine for us here and the problem seems to be with your TeeChart's installation in Delphi 2007. It could be that only standard version features packages were installed. You could try running TeeInstall or TeeRecompile tools for reinstalling the packages at your IDE.

Posted: Wed Dec 03, 2008 11:19 am
by 10551030
Hi,

I had recompiled before but never the less did it again with no changes. what I find weird is that once a TChat is properly loaded I can reopen those projects fine. what I do right now is start the IDE, Ignore the warning, close all, reopen. to get it opened correctly... the same project loads fine in D2006... anyway if I find the problem I'll let you know.

Posted: Wed Dec 03, 2008 11:23 am
by narcis
Hi marc_x,

Ok, thanks for the info. You could also check that when loading problematic projects TeeChart packages are enabled for them at Project -> Options -> Packages.

Posted: Wed Dec 03, 2008 11:44 am
by 10551030
I am under the impression that the CursorTools are in the same package as of TChart... When the project loads the only 2 references I loose are those of the 2 cursor I created within the chart. the chart itself loads. other components such as ChartEditor do also... just those 2 cursors don't reload the first time around in the IDE.

Posted: Wed Dec 03, 2008 11:52 am
by narcis
Hi marc_x,

Yes, they are. I was thinking about this possibility if the cursors are the first thing declared in the form so the IDE complained about that first.

Posted: Wed Dec 03, 2008 11:58 am
by 10551030
The cursors are child objects of the chart...

object ChartAnalysis: TChart
Left = 1
Top = 59
Width = 780
Height = 653
AllowPanning = pmHorizontal
...
...
object TEST: TFastLineSeries
Marks.Arrow.Visible = True
Marks.Callout.Brush.Color = clBlack
Marks.Callout.Arrow.Visible = True
Marks.Visible = False
LinePen.Color = clRed
XValues.Name = 'X'
XValues.Order = loAscending
YValues.Name = 'Y'
YValues.Order = loNone
end
object Series1: TFastLineSeries
Marks.Arrow.Visible = True
Marks.Callout.Brush.Color = clBlack
Marks.Callout.Arrow.Visible = True
Marks.Visible = False
DataSource = TEST
LinePen.Color = clGreen
XValues.Name = 'X'
XValues.Order = loAscending
YValues.Name = 'Y'
YValues.Order = loNone
YValues.ValueSource = 'Y'
object TeeFunction1: TMovingAverageFunction
Period = 3.000000000000000000
end
end
object LeftCursor: TCursorTool
Pen.Color = clRed
Snap = True
Style = cssVertical
OnChange = LeftCursorChange
end
object RightCursor: TCursorTool
Pen.Color = clBlue
Snap = True
Style = cssVertical
OnChange = RightCursorChange
end
end
end

They are also refered to after the chart in the .pas file

Posted: Thu Dec 04, 2008 10:04 am
by narcis
Hi marc_x,

Thanks for the info. If you want us to have a look at the issue please send us a simple example project we can run "as-is" to reproduce the problem here.

Thanks in advance.

Posted: Thu Dec 04, 2008 1:39 pm
by 10551030
Hi Narcis,

I have tried uploading an avi file showing the problem... don't know if it worked so i'll go through the steps here

I open RAD2007 with no project saved
Create a new project (Delphi)
Add a chart
double click it and add 2 cursors
save the project
close the IDE (The current project is saved)
Reopen RAD2007
After loading the design time package the IDE loads the last project then I get the error
I ingore all
I get my form with a chart but the cursors are gone

Posted: Thu Dec 04, 2008 1:44 pm
by 10551030
Hi again,

could the design time package not load at the proper time, I have notice once (It opened without error with the project) that I could see the TeeChart package being loaded before the project...