Marielle Lange wrote:
I discussed flushevents very brielfy with Marcus (van Houdt). The
recommendation was to stay away from using flushevents unless having a
very good reason to use it.
I am a psycholinguist, I am a lot more comfortable with regular
expressions than with lockmessages or flushevents constructs ;-). I
would be interested in hearing about some recipes. When to consider
using them? What to be careful about? (like the increase in CPU that was
mentioned when attempts of multithreading are made).
The reason to avoid them is because indiscriminate use can disrupt the
message queue, as you might remove messages that your scripts expect to
recieve.
I've found that flushEvents is hardly ever needed. It is usually
sufficient to put a blocking handler in place so that the message stops
as soon as it is sent. The most common usage for flushEvents is in
software intended for young children or computer novices, where repeated
mouse clicking is common. I have used flushEvents in software for
special needs children who tend to click repeatedly on a button. These
repeated clicks will accumulate and the button script will be executed
many times. To prevent that, I cleared the queue of mouse events so that
only the first click was executed.
Note that there is an old HyperCard trick that works in a similar way if
all you need to clear are mouse messages:
wait while the mouseclick
--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software | http://www.hyperactivesw.com
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution