Page 1 of 1

GetCursorValueIndex throwing EOSError

Posted: Mon Dec 14, 2009 5:44 pm
by 10054271
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.

Re: GetCursorValueIndex throwing EOSError

Posted: Wed Dec 16, 2009 3:50 pm
by yeray
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).

Re: GetCursorValueIndex throwing EOSError

Posted: Wed Dec 16, 2009 4:31 pm
by 10054271
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?

Re: GetCursorValueIndex throwing EOSError

Posted: Thu Dec 17, 2009 9:29 am
by yeray
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.