How to handle a "wait for file" situation
J. Landman Gay
jacque at hyperactivesw.com
Tue Jun 9 15:25:30 EDT 2009
Mark Smith wrote:
> Jaque, I'm not sure this is right, these days.
>
> On my mac laptop I just did this:
>
> button in a new stack with a script:
> on mouseUp
> repeat 20
> wait 1 second
> end repeat
> put "done"
> end mouseUp
>
> I then opened the Apple Activity Monitor, I could see Revolution using
> 12% of cpu. Back to the stack, clicked the button. I saw Revolution go
> up to 19% then quickly down to less than 0%. After 20 seconds, the
> message box appeared with "done", as expected. And I had the quicktime
> player playing some music while this was happening.
>
> So I can well believe that all processes that are to do with the running
> engine will stop during a wait, but it doesn't seem to affect anything
> else, and it would surely be a gigantic bug if it did, no?
That's good to know...so maybe it's just mouse polling that's bad. I
admit I haven't tested any of it since Scott Raney used to rail about it
all those years ago. But your tests seem to show that a wait only halts
the engine that's running.
This is an example the the type of thing Raney always got peeved about:
repeat
if the mouse is up then exit repeat
put the mouseloc
end repeat
Will test some time when I can, unless you do it first. ;)
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list