Tenchi-Man wrote:

Hi John,

Thanks for you reply. My code is below:
switch (cmd) {
 case sysAppLaunchCmdNormalLaunch:
  if ((error = AppStart()) == 0)
  {
    AppEventLoop();
    AppStop();
  }
  else
   FrmAlert (Alert);
  break;

  case sysAppLaunchCmdSystemReset:   //Enable after soft reset
  SystemResetFunction();
  AppStop();
      break;

 default:
  break;
}

However, my Palm is still reset and reset repeatly..... any idea??


Question1: why are you calling your AppStop() function in response to the Reset command? Usually, the AppStop() function is used to clean up records, close forms, etc., ect., just before you switch to another app. Usually, that type of cleanup only applies if you have been responding to a "NormalLaunch", and when your UI has been displayed.

Question2: What's in your SystemResetFunction()? Any globals, or 'other' segments?

Bob.


Thanks again

Ray



"John Newell" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]


Should be OK.
if (cmd == sysAppLaunchCmdNormalLaunch)  // ie. 0
{
  App normal programming with UI action
  EventLoop
}
else if (cmd == sysAppLaunchCmdSystemReset)  // i.e. 5
{
  Do app reset action - NO UI allowed
  exit program
}










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

Reply via email to