Hello all...
 
In my application I use the system event queue to pass messages
around.  I'm noticing that if I have a FrmCustomAlert up when
a user event comes in I never seem to see it.  If I comment out
the FrmCustomAlert I do get it.  I don't know what other situations
might arise where this event will go missing.
 
Given the following: (these are actually an offset from firstUserEvent)
 
#define MY_EVENT1       27182
#define MY_EVENT2       26881 // this is the one that disappears
 
and I add MY_EVENT1 and MY_EVENT2 to the event queue via EvtAddEventToQueue
and my event handler responds to MY_EVENT1 by putting up a FrmCustomAlert
I never get MY_EVENT2.  Note that I do call EvtGetEvent in between
adding the two events.
 
I turned on event logging in the emulator and in both cases (with and
without the frmCustomAlert) EvtGetEvent says it is returning the event.
But, interestingly, there are some window events, for the FrmCustomAlert
I assume, right in the middle of things.  The log looks like this:
 
312.877:     -> EvtAddEventToQueue: Application event #27182
312.927:    <-  EvtGetEvent: Application event #27182
312.932:     -> EvtAddEventToQueue: Application event #26881
312.982:    <-  EvtGetEvent: winExitEvent    Enter: 000039C0   Exit: 000036EC  Enter 
Form:
"Information"  Exit Form: "Coll"
312.982:    <-  EvtGetEvent: winEnterEvent   Enter: 000039C0   Exit: 000036EC  Enter 
Form:
"Information"  Exit Form: "Coll"
312.982:    <-  EvtGetEvent: Application event #26881
 
26881 is the missing event but EvtGetEvent shows it is delivering it.  But
there are those winExitEvents in between.
 
To pin it down even more and make sure some other event handler wasn't
getting the event I put this code in the main AppEventLoop right around
where I call EvtGetEvent:
 
MemSet(&event, sizeof(EventType), 0);
EvtGetEvent (&event, 10 );
 
if( event.eType == 26881 )
{
     LOGPRINT( "PLM_APP: GOT A 26881 EVENT!!!" );
}
 
I never get that message for the missing event in my log file.
It would seem that FrmCustomAlert is pulling events off the queue
on its own and, in this case, swallowing mine.
 
Anyone know what's going on here?  Any workarounds short of implementing
my own queue and checking it in the main AppEventLoop?
 
thx...Adrian Pfisterer.

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to