>My Scrabble clone takes ~15 seconds or more to find a move under some
>circumstances (like if there's a blank involved). I want to allow
>users to cancel the operation, and if possible I want to resume later
>from where I stopped.
This is great. I wish more developers would pay attention to details like
this! :)
You should do basically what you're doing (calling EvtSysEventAvail). A
good example of this are the Palm PIM apps in their search routine. If you
look there I bet you notice one thing different from your code. :)
>The problem is that EvtEventAvail() never returns false, even though
>the only event on the queue is the custom event I'm currently
>processing. I'm guessing that an event isn't removed from the queue
>until the handler returns true
Yes. Often if your code is activated by the user tapping a button, then a
penUpEvent is still on the queue.
>So how do I work around this?
Call EvtSysEventAvail(Boolean ignorePenUps) with true instead of false.
That will then ignore the penUpEvents.
-Roger Flores