In reply to a message from "Mike Davis" <[EMAIL PROTECTED]>:
Mike, I see a couple of things that look suspicious in your
CheckEscape() routine:
1. You don't check the event.type, you just access the event data
*assuming* that it's ctlEnterEvent.
2. If you look at nearly all the example source code out there, they
call two other OS routines in the event loop besides
FrmDispatchEvent(): SysHandleEvent() and MenuHandleEvent(). My hunch is
SysHandleEvent() provides magic that is needed for event processing to
run as intended, and CheckEscape() is not allowing that magic to
happen.
> Here is the loop logic. One of the things that can be done in the do
> something section, is a FrmPopupForm(frmMyForm) but frmMyForm is
> never opened. I'm sure the problem lies with this Escape Function
> that is somehow not allowing events to reach my handler. Can anyone
> tell why this should not work? I do have event handlers for the form
> and I can open the form with FrmPopupForm(frmMyForm) from outside of
> the loop but not if FrmPopupForm is called while in this loop.
>
> //Begin Loop
>
> CheckEscape()
> // do something
>
> //Repeat Loop
>
>
> void CheckEscape(void) {
> EventType event;
> UInt16 err;
>
> EvtGetEvent(&event, 0);
> if(event.data.ctlEnter.controlID == btnESC) {
> progPaused = TRUE;
> }
> else {
> FrmDispatchEvent(&event);
> }
> }
--
Roger Chaplin
<[EMAIL PROTECTED]>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html