At 6:39 PM -0700 1999/05/20, Richard Bram wrote:
>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

You're throwing away the event if it's not a page up or down key. That's a rather 
serious problem... you need to at least pass it on to SysHandleEvent. If you don't, 
bad things may happen. Doing so from this routine, however, would be a bad idea, as it 
sucks you into the tangled world of nested event loops.

Regards,

Jim Schram
3Com/Palm Computing
Partner Engineering

Reply via email to