> The following is a clip from the documentation for frmUpdateEvent in the > Palm OS 5.0 documentation. I am confused by how the event is supposed to be > received by the application. The documentation states when a form (or part > of it) needs to be redrawn, a frmUpdateEvent is added to the event queue.
That's correct. Well, it's a true statement insofar as it goes. The SDK documentation deigns to comment on whether there are other ways that frmUpdateEvent may (and does) get sent. But that's not the problem here. > However, I believe that when the OS shuts down a system modal form (via > DoDialog) the event is not added to the queue, but in fact dispatched > directly to the form that is supposed to be updated (via the registered > event handler). If the event was actually added to the event queue, I > should see the event during my EvtGetEvent() loop. However, this is not the > behavior that I am seeing. The form is receiving the event directly, > circumventing my applications event handler (where I want to handle it). FrmDoDialog spins its own event loop. Your event loop does not get control back until FrmDoDialog returns. Refer to the OS source for details on how FrmDoDialog works. But regardless, it is in fact possible to directly dispatch any event, and the OS does dispatch certain events directly in some cases. Generally you shouldn't rely on being able to pre/post-process (or even process :-) events in your application event loop. Especially since various functions spin their own event loops (FrmDoDialog and LstPopupList spring to mind -- refer to the OS source for others). -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
