I use local while (penDown) loops all the time. It's fine... the idea is to
avoid nested Event Loops which use EvtGetEvent. Using while (penDown) loops
with EvtGetPen() is perfectly fine.
Alan Pinstein
Synergy Solutions, Inc.
http://www.synsolutions.com
1-800-210-5293
>Greetings,
>
>I have a question about event flow while tracking the pen in various
>circumstances. Say for instance I have a paint program and I'm tracking
>the pen while the user draws a line. My inclination is to just have a
>tight little "while( penDown )" loop, but the other way to do it would be
>to let the normal event flow go on in the background, and respond to
>individual penDown, penMove, and penUp events.
>
>Of course there will be some speed difference, but assume that's not
>important here. Is there any other good reason to go through the normal
>event loop instead of writing a "local" loop?
>
>Similarly, let's say I have a gadget that's sort of like a shuttle
>control on a tape deck, that I can use to vary the scroll speed of a
>display of some kind as long as the pen is down. It's probably easiest to
>write it as gadget that's tightly coupled to the display (with a
>callback, say), and again to keep the pen tracking loop "local." But
>again, I could go through the main event loop instead. Should I?
>
>Perhaps this is more a philosophical/style question than one with a clear
>cut answer, but I'm curious what the experienced folks have to say about
>it.
>
>Thanks!
>
>Dave Johnson