At 02:11 PM 9/26/2002 +1200, you wrote:
>There is a conversation in the archive that suggests that this
>behaviour is true for FrmUpdateForm calls (which bypass
>FrmDispatchEvent if my memory serves me true) but not
>for frmUpdateEvents arising from other PalmOS activity
>which seem to always be sent to the active form.

FrmUpdateForm does not bypass the event queue.  It just posts the 
event.  The code in FrmEraseForm that updates forms that were hidden by the 
just-erased form does bypass the queue, calling each revealed form's event 
handler directly.

 From inspection, the only ways to send events directly to form event 
handlers are the functions: FrmCloseAllForms and FrmSaveAllForms.  In 
particular, your suspicion about what events are routed differently is 
correct.  FrmDispatchEvent will only send frmGotoEvents and frmOpenEvents 
to forms that aren't the active form.

This doesn't mean that FrmUpdateForm is useless for updating forms that 
aren't the current one, but the only situation where this would work would be:

FrmUpdateForm(frmBelowMe, code);
FrmDeleteForm(frmMe);

so the form below you would become active after you killed yourself... and 
of course, your form might get a redraw update event before it gets your 
custom update event.

This isn't very clean at all, IMO.

-- 
Ben Combee
CodeWarrior for Palm OS Platform technical lead
[EMAIL PROTECTED]


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

Reply via email to