> From:  Sean Howarth
>
> My suspicion is that the launch code sysAppLaunchCmdSyncNotify
> is part of the problem. If the other app is installed, the
> other app will get called with this launch code ( I think ),
> but if it is not, my app will get called with it. I know that
> the code to handle this code should all reside in segment 0,
> but I don't handle this code at all, so it should be okay!
>

Make sure that your program doesn't try to access any globals unless globals
are available.  A typical PilotMain that handles only
sysAppLaunchCmdNormalLaunch looks like this:

static UInt32 PilotMain(UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags)
{
  Err error;

  error = RomVersionCompatible (ourMinVersion, launchFlags);
  if (error) return (error);
  switch (cmd)
  {
    case sysAppLaunchCmdNormalLaunch:
      error = AppStart();
      if (error)
        return error;
      FrmGotoForm(MainForm);
      AppEventLoop();
      AppStop();
      break;
    default:
      break;
  }
  return errNone;
}

It is a common mistake to add something that accesses globals before making
sure they are available.  For example, if RomVersionCompatible accessed a
global, it would crash for most launch codes.

I don't know if this solves your problem, but it seemed worth mentioning.


-- 
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