Hi,

I'm testing my application which is triggered by button on command shortcut
bar when other application running. The platform is POSE OS3.5 or OS3.5.1.

First, I register my app to receive sysNotifyMenuCmdBarOpenEvent and
myAppCreator as the notification constant. Then

//....
case sysNotifyMenuCmdBarOpenEvent:
MenuCmdBarAddButton
(menuCmdBarOnLeft,resID,menuCmdBarResultNotify,myAppCreator,"My app name");
//....

case myAppCreator:
//go to my app form

//....


All these work well, and the form is opened and the cursor in the text field
of my form is blinking normally. Then, once I tap anywhere on the screen,
press any key on keyboard (i'm testing it in POSE), the POSE is hanged. What
I can do is killing it!

Here is my event loop:

 while (true)
 {
      EvtGetEvent (&event, 0);  // 0 because I need to poll
KeyCurrentState(). Is it suitable?
      //do a lot of things....
        if (condition to exit)
            break;

#ifdef MyDebug
        if (event.eType != nilEvent){

            // Add breakpoint in debug mode here
        }
#endif

 }

But, when I run in debug mode with the breakpoint showing above, it's not
hanged and running well. Once i disable the breakpoint, it hangs again!

I replace the breakpoint with this delay code:
UInt32 tick = TimGetTicks() + 100;
while (TimGetTicks() < tick){}

It also hangs.

However, if I trigger my form by another way, say, hacking a system trap
like sysTrapSysKeyboardDialog, it doesn't hang!!!

Moreover, if I run it on POSE OS4, or PalmSim, it also doesn't hang!!! I
really get sick of it! Anyone can help me, please.

Best Regards,
Edmund



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

Reply via email to