[ANN] [EN] [FR] Tutorial #27 by So Smart Software: How to select objects using a selection rectangle built on-the-fly
Eric Chatonet
eric.chatonet at sosmartsoftware.com
Wed Aug 13 04:13:50 EDT 2008
Bonjour Chipp, Jacque, Richard and all,
I have modified my tutorial to use a mouseMove handler instead of a
repeat loop.
Those who use Tutorials Picker to access tutorials will get
automatically the new version the next time they will display it.
Those who have downloaded it directly from my website will have to
download it again. Sorry for the inconvenience.
That said, I made tests:
Using a repeat loop:
On my Vista quadriCore machine, CPU usage went from 5 to 20%
On my old Mac G4 bi, it went from 15 to 50%
Using mouseMove:
On my Vista quadriCore machine, CPU usage went from 5 to 10%
On my old Mac G4 bi, it went from 15 to 20% but with unexpected peaks
at 40%
Anyway it's far better :-)
Usually I'm aware of polling the mouse but I did not think it could
be worrying in this case.
The lesson is definitely to never poll the mouse in any case :-)
Thanks for having pointed this out.
Le 12 août 08 à 21:08, Chipp Walters a écrit :
> Hi Eric,
>
> Thanks for this. Interesting to see your technique.
>
> One question. I always thought 'repeat until mouse is up' was
> discouraged as it is does not allow multi-tasking for other apps while
> in use. I've always used mouseMove for this sort of thing. Has that
> changed?
>
> -Chipp
Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: eric.chatonet at sosmartsoftware.com/
----------------------------------------------------------------
More information about the use-livecode
mailing list