How to handle a "wait for file" situation
Scott Rossi
scott at tactilemedia.com
Tue Jun 9 16:53:26 EDT 2009
Recently, Mark Smith wrote:
> Yes, I think you have to be careful with mouse stuff:
>
> on mouseDown
> repeat
> if the mouse is up then exit repeat
> put the mouseloc
> end repeat
> end mouseDown
In my experience, the processor load is relative to the frequency of Rev's
messages. Messages sent with a frequency of once a second or longer do not
appear to significantly impact the processor. As message frequency
increases to intervals less than one second, processor load begins to
increase significantly.
One interesting exception is "wait... with messages". This can effectively
act as an ultra fast loop or repeat but does not appear to impact processor
load (at least not according to OS X's Activity Monitor).
on mouseUp
wait until mouseH() > 200 with messages
put "done"
end mouseUp
Regards,
Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
More information about the use-livecode
mailing list