GetCursorValueIndex throwing EOSError

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
skassan
Newbie
Newbie
Posts: 27
Joined: Fri Sep 18, 2009 12:00 am

GetCursorValueIndex throwing EOSError

Post by skassan » Mon Dec 14, 2009 5:44 pm

I'm calling GetCursorValueIndex inside the GetMarkText handler for a series that is updating fairly frequently (about 10 times/second). It appears that whenever the screen saver starts up, the call to GetCursorValueIndex is throwing an EOSError exception. The text of the exception is "A call to an OS function failed" and the ErrorCode is zero.

Of course, I can catch the exception and handle it, but I'm wondering if I'm doing something incorrectly, or if this is just a symptom of a more deeply rooted problem. Is this expected behavior?

I'm using TeeChart Pro v8.06.60902 Win32, CodeGear™ C++Builder® 2007 R2 Version 11.0.2804.9245, and Windows XP SP3. Which screen saver I use doesn't seem to matter.

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

Re: GetCursorValueIndex throwing EOSError

Post by Yeray » Wed Dec 16, 2009 3:50 pm

Hi skassan,

I could reproduce it with the code bellow in a WinXP machine but only with the option "On resume, show Welcome screen" active. Could you please confirm that?

Code: Select all

var count: Integer;

procedure TForm1.FormCreate(Sender: TObject);
begin
  count:=0;
end;

procedure TForm1.Series1GetMarkText(Sender: TChartSeries; ValueIndex: Integer;
  var MarkText: string);
begin
  Chart1.Title.Text.Text:='cursorindex: ' + inttostr(Sender.GetCursorValueIndex) + ' count: ' + IntToStr(count);
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
  count:=count+1;
  Chart1.Draw;
end;
I've added it to the bug list to be fixed in future releases (TV52014599).
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

skassan
Newbie
Newbie
Posts: 27
Joined: Fri Sep 18, 2009 12:00 am

Re: GetCursorValueIndex throwing EOSError

Post by skassan » Wed Dec 16, 2009 4:31 pm

Yes. I can confirm that by not selecting the option "On resume, show Welcome screen", the problem does not appear.
Is there some other work around, other than catching the exception?

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

Re: GetCursorValueIndex throwing EOSError

Post by Yeray » Thu Dec 17, 2009 9:29 am

Hi skassan,

I'm not sure if it's possible to check the screensaver activity. If possible, you could add an if condition in your event to prevent the conflict when the screensaver is executing.
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

Post Reply