From: "Tam Hanna" <[EMAIL PROTECTED]>
> I already tried out to modify the code, and it now looks like this:
> FormPtr myform;
> myform=FrmInitForm(SyncForm);
> FrmDrawForm(myform);
> FrmSetActiveForm(myform);
> FrmSetEventHandler(myform, HsFormHandleEvent);
>
Why have you chosen this sequence?  I ask because I would have
thought that FrmSetEventHandler() needed to be set before any
events could possibly arise.

The documentation for FrmSetActiveForm includes the
following: "In Palm OS releases earlier than 3.5, this function 
generated a winEnterEvent for the new form immediately following 
the winExitEvent for the old form. Starting in Palm OS 3.5, 
FrmSetActiveForm does not generate the winEnterEvent. The 
winEnterEvent does not occur until the newly active form is drawn."

This suggests that either FrmDrawForm() or FrmSetActiveForm() are
capable of raising events and, in the sequence above, this will happen
before the event handler for the form is in place.  Or am I missing
something?

Chris Tutty

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

Reply via email to