Jeff Diamond wrote: > > This may sound elementary, but I'm totally stumped. My app is > running - some other app interrupts it - could be an alarm or a > system dialog... Before OS 3.5, I got a winExitEvent so I knew I was > interrupted - and I just waited for a winEnterEvent to continue. > [...] > > BUT NOW - in OS 5.x, not only don't I get the winExitEvent in time, > but also my application isn't blocked from running after it's > interrupted. The result is that my application keeps running AFTER > the external dialog appears, drawing over top of the dialog > completely before losing all pen input.
In OS 5.x, exactly how does your application continue to run?
Your application normally can't receive additional events, because even in OS
5.x, AFAIK there's a single, shared event queue, and if there's a dialog
active, that dialog's event handler grabs all events.
Do you mean that your application continues to receive notifications? If so,
then that's the same behavior as in previous OS versions, and you need to check
to see if the active form/window is yours within your notification handlers.
I scanned the archives at escribe for an answer to a problem I'm having, and this thread seems to be about a similar thing, so I'm picking it up where it seems to have left off.
I have a Bluetooth application whose BT-callbacks post custom events to the event queue as data comes in. The problem is that the interrupting program (as described above) will happily eat my custom events, causing my protocol state machine to lose track of what's going on.
The solution, as I envision it, would be for my BT-callbacks to call a wrapper for EvtAddEventToQueue() that checks to see if event-sending should be suspended. If so, the events will be stored and resent when the suspension is lifted.
Now, my question is how to reliably detect the comings and goings of interrupting programs, including potentially tricky scenarios, where my app is being quit while an interrupting program is showing its form.
Any ideas?
Best regards, jonas
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
