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.
GetCursorValueIndex throwing EOSError
Re: GetCursorValueIndex throwing EOSError
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?
I've added it to the bug list to be fixed in future releases (TV52014599).
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;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: GetCursorValueIndex throwing EOSError
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?
Is there some other work around, other than catching the exception?
Re: GetCursorValueIndex throwing EOSError
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.
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,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |