Subject SQLWaitCursor problem
Author

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:


  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 remark there is clearly indicated, that the UseCursor property must be true for it 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 BusyCursor
          begin
            sc := BusyCursor;
            GetScreenCursorTimer;
          end
          else
          begin
            sc := 0; // crDefault FOldCursor;
            GetScreenCursorTimer( false );
          end;

and from line 13542 on:

        if usecursor and ( BusyLevel > 0 ) then           // added usecursor to avoid BusyCursor
        begin
          sc := BusyCursor;
          GetScreenCursorTimer;
        end
        else
          FBusyCursorTick := 0;

That solves the problem for me, but I have to make notes to not forgett to redo it, when making an update. The number of notes are increasing and I hope some of my changes find the way into a release.