since you are changing the ID of the event, I would have to guess that it is
a second event.

maybe a second one is generated when the alert pops up and the user is still
holding the key down?



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of James
Sent: Monday, July 23, 2001 1:39 PM
To: Palm Developer Forum
Subject: Alerts, events and keys - one or two events


I have a little program where I want to intercept a couple of keyDown
Event's and do some things base on them.  Basically I "cheated" and did the
following:


void AppEventLoop(void)
{
  UInt16 error;
  EventType event;

  do
  {
    EvtGetEvent(&event,evtWaitForever);
    if(event.etype==keyDown && event.data.keyDown.chr >= hard1Chr)
        event.etype=firstUserEvent;

    if(!SysHandleEvent(&event) &&
       !MenuHandleEvent(0,&event,&error) &&
       !AppHandleEvent(&event))
      FrmDispatchEvent(&event);
  }
  while(event.eType!=appStopEvent);
}

in my form handler, I look for fistUserEvent and do what I want.

my problem is that in my code, I opened up an frmCustomAlert to put up some
debug info.  What happens is that I press hard1Chr key, I get the pop up,
and then I switch right to the application that is associated with that key
(I forget now if it switches right away or if it switches after I hit the
"ok" button, but I know I get at least the pop up to "flash on the screen").
If I do not have the pop up everything works.  Since the alerts have their
own AppEventLoop (or at least I think they do), they get they keyDown event
and do what they are suppose to do.  My question is

is the alert getting the "same" keyDown event or is there a 2nd one being
generated?



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
For information on using the Palm Developer Forums, or to unsubscribe,
please see


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

Reply via email to