Subject | RE: [IBO] SQLWaitCursor problem |
---|---|
Author | Jason Wharton |
Post date | 2017-09-17T16:18:47Z |
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]
Sent: Thursday, September 14, 2017 2:08 AM
To: IBObjects@yahoogroups.com
Subject: [IBO] SQLWaitCursor problem
I have another problem with my IBO update from 4.8 to 5.9.
With IBO4.8 I never had a SQLWaitCursor, when calling DisableControls. Now whenever I use DisableControls, I get a SQLWaitCursor.
I found out, that I just need to set UseCorsor of TIB_Session to false, to avoid that. I did not need to do that in IBO4.8.
So far so good. Now I discovered that UseCursor is not used everywhere a WaitCursor is set.
In IB_Components in the declaration part of TIB_Session ther is the following:
In the remark there is clearly indicated, that the UseCursor property must be true for it to happen.property BusyCursor: smallint read FBusyCursor
write FBusyCursor
default -17; // crSQLWait
{: Determines the cursor that will appear on the screen when a process is
active and there is a Yield indication. See IsYielding for a description of
what is considered a Yielding situation.
<br><br>
The UseCursor property must be true for this to happen.}
In the TIB_Session.CheckScreenCursor method however, it does not follow this guideline. UseCursor is not used to decide if the Waitcursor should be used or not. I had to make 2 changes to the source to get it done as I think it should be done.From line 13498 on:if usecursor and ( FBusyCursorTick > 0 ) then // added usecursor to avoid BusyCursorbeginsc := BusyCursor;GetScreenCursorTimer;endelsebeginsc := 0; // crDefault FOldCursor;GetScreenCursorTimer( false );end;and from line 13542 on:if usecursor and ( BusyLevel > 0 ) then // added usecursor to avoid BusyCursorbegin