Trouble with graphics display in OS X
James Hurley
jhurley at infostations.com
Fri Jan 14 12:50:58 EST 2005
>
>Message: 2
>Date: Fri, 14 Jan 2005 10:25:02 -0500
>From: "Frank D. Engel, Jr." <fde101 at fjrhome.net>
>Subject: Re: Trouble with graphics display in OS X
>To: How to use Revolution <use-revolution at lists.runrev.com>
>Message-ID: <760D4C7E-6640-11D9-9E6D-0050E410655F at fjrhome.net>
>Content-Type: text/plain; charset=US-ASCII; format=flowed
>
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Just a theory: try replacing the "wait" command with "unlock screen".
>See what that does for you.
>
>**********************************************
Frank,
Thanks for that interesting suggestion. It turned out to have
precisely the same effect as "wait 0 millisec" This suggests that the
fix involves a forced screen refresh.
You can see the comparison in the following handler.
on mouseUP
put the ticks into tStartTime
set the loc of grc "ball" to 10,100
repeat 600
wait 0 millisec -- Using this line the handler takes 107 ticks
--unlock screen -- Using this line the handler takes 109 ticks
--Using neither the handler takes 46 ticks; twice as fast, but
you see only a couple of locations of the ball.
put the loc of grc "ball" into tLoc
add 1 to item 1 of tLoc
set the loc of grc "ball" to tLoc
end repeat
set the loc of grc "ball" to 10,100
put the ticks - tStartTime & return after field 1
end mouseUP
In OS 9, the screen refreshes (at least that is my interpretation of
what happens) without the wait or the unlocking of the screen.
The problem I have is OS X is that it slows things up considerably
when I have to insert the wait or unlock in each iteration of the
loop. I wonder whether this has anything to do with the difference in
screen refresh rate in OS X verses OS 9.
Jim
More information about the use-livecode
mailing list