You're making things too complicated, you just need to intercept the buttons
in your main event loop before you pass the event to the OS.
Check out: http://oasis.palm.com/dev/kb/papers/1148.cfm (the 'User Input
Through Keys' section)
----- Original Message -----
From: "Mark Lenz" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, April 17, 2002 12:41 PM
Subject: Re: Ignore User Input
>
> Thanks for your response, Richard.
> Maybe I wasn't clear enough, or maybe I'm still not doing this right.
>
> If I try handling the event this way, the hardware buttons are handled by
> SysHandleEvent() (which I don't want)
> //My communication loop.
> for (int x = 0; x < timeToQuit; x++)
> {
> /* Doing stuff */
>
> EvtGetEvent(&event, -1);
>
> if (!SysHandleEvent(&event))
> {
> if (!MenuHandleEvent(0, &event, &error))
> {
> FrmDispatchEvent(&event);
> }
> }
> }
>
> If I try handling the event this way, the hardware buttons aren't handled,
> but I never see the 'Cancel' button press.
> //My communication loop.
> for (int x = 0; x < timeToQuit; x++)
> {
> /* Doing stuff */
>
> EvtGetEvent(&event, -1);
>
> FrmDispatchEvent(&event);
> }
>
> How can I keep the user on my form no matter what, unless they tap my
> cancel button (functioning just like HotSync)?
>
>
> Mark Lenz
> (920) 832-3523
> [EMAIL PROTECTED]
>
>
>
> Richard Bell <[EMAIL PROTECTED]>
> Sent by: To: "Palm
Developer Forum"
> bounce-palm-dev-forum-48969@news.
<[EMAIL PROTECTED]>
> palmos.com cc:
> Subject:
Re: Ignore User Input
>
> 04/17/2002 10:17 AM
> Please respond to "Palm Developer
> Forum"
>
>
>
>
>
>
> All you need to do there is capture all of the data entry events and
> "handle" them but don't do anything with them unless its your cancel
> button. In other words in your form event handler return true for all
> events even if you don't do anything with them.
>
> At 10:04 AM 4/17/2002 -0500, you wrote:
> >I am creating an app that uses the serial port for communication with
> >another device. The serial communication lasts about a minute or two. I
> >would like to be able to ignore all user input except for the user
tapping
> >the cancel button, just like the HotSync app does. Can anyone tell me
how
> >or point me in the right direction?
> >Thanks.
> >
> >Mark Lenz
> >(920) 832-3523
> >[EMAIL PROTECTED]
> >
> >
> >--
> >For information on using the Palm Developer Forums, or to unsubscribe,
> >please see http://www.palmos.com/dev/support/forums/
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
>
>
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/