The talk of repeat loops got me thinking about the FOL that staying in a
tight repeat loop for more than a couple of seconds gives you a spinning
beachball of death under MacOS X. (And I believe something similar on
windows.)
Try this:
on test
loopMore = 1
repeat while loopMore
if _key.keyPressed(SPACE) then loopMore = 0
nothing
end repeat
put "done"
end test
After a few seconds, you get a beachball. (Hit the space bar to exit the
loop.)
On a whim, I tried a variation of Zav's sleep() trick, and it worked --
no beachball! Replace the "nothing" statement with sleep(1):
on test
loopMore = 1
repeat while loopMore
if _key.keyPressed(SPACE) then loopMore = 0
sleep(1)
end repeat
put "done"
end test
No beachball. I did a couple of tests to see if idle events are
generated, but they're not.
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[email protected] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]