Thanks Martin. 

You've been very helpful, and I'm not embarassed since I haven't dribbled 
anything down the front of my shirt, and finding and fixing bugs is 
always honorable - it is the leaving them in that gets embarassing. :-) 

What you described is definitely one of the problems. We've been delving 
into this, and found that there are some others as well. 

If you have other commands that you respond to in the PilotMain, then all 
of these have to fit in the first code segment, even if your app is 
otherwise a multisegment app. 

Another constraint is that the code to process other commands can't use 
global variables. There are some globals that c++ puts in for you, so 
even if you get the If statement right it is possible to go wrong in 
other ways. 

I think we're all set with this now. 

Best wishes,

--Catherine E. White
  www.llamagraphics.com

-----------------------------------
Martin van Velsen recently wrote:

> Back in July, Martin van Velsen sent the following messages to the Palm
> Developer's Forum. I did not see a resolution to this, but we are
> encountering the same kind of behavior on a Palm III and a Palm Pro.

The answer to this is very simple and I think most people won't email
the solution because it might be very embarrassing. Look at your main
loop and see where you do something like:

DWord PilotMain (Word cmd,Ptr cmdPBP,Word launchFlags)
{ 
 if (cmd==sysAppLaunchCmdNormalLaunch)
 {

 }

 return (0);
}


When you install a pilot app it actually calls your main loop for
administrative purposes. If you don't call this 'if' statement in the
right place ( due to some changes I had this line at a later stage )
your code will be activated for a cmd that it should not process.

Martin

+----------------------------+---------------------------------------+
|      Martin van Velsen,    | Robotics Institute (RI,CIMDS),        |
| email: [EMAIL PROTECTED] | Carnegie Mellon University            |
|       [EMAIL PROTECTED] | www: http://kip.sateh.com/~martin     |
|        [EMAIL PROTECTED] |      http://www.sis.pitt.edu/~vvelsen |
+----------------------------+---------------------------------------+

Reply via email to