I don't see anything wrong with calling EvtGetEvent without writing
a whole new handler. When I'm doing something like that, I just
call this routine once in a while to see if I should abort:
Word AbortEvent()
{
EventType event;
Word result;
EvtGetEvent(&event, 0);
result = event.data.keyDown.chr;
if( event.eType == keyDownEvent)
if(result == pageDownChr || result == pageUpChr)
return(result);
return(0);
}
If it returns 0, just continue, else deal with a page up or down character
by quitting, aborting, whatever
Rick Bram
>When the slow_func() is executing, events are being queued but the main
>event loop isn't getting to process them. Calling EvtEventAvail() in
>slow_func() will indicate if there is an event queued, but is there any way
>of telling what event it is? If I call EvtGetEvent() I'll effectively have
>to write a whole new event handler in slow_func() which would not be
>elegant, even if it did work.