[[ This message was both posted and mailed: see
   the "To," "Cc," and "Newsgroups" headers for details. ]]

I will try to put it another way. When your program starts with a
NormalLaunch, or a GoTo launch, you have globals, and the Palm startup
code will relocate the other segments in a multi-segment app and fix up
the function pointers. All other launch codes do not have globals and
do no relocate (presumably because if it relocated on every launch
code, then it would really slow things down on the Palm). 

So, you have to put ALL the code that is called in a launch code that
does not give you globals into the first segment. The way to figure out
if you have successfully done this is to temporarily comment out the
parts of your PilotMain function that respond to the NormalLaunch and
GotoLaunch, and then turn on the linker flag that creates a link map.
When you build your project, the linker will strip out all unused code,
which will include any code called by those parts you commented out.
Whatever is left MUST be in segment 1. The link map will tell you
whether there are functions in the other segments.

However, all this said, that may or may not be your answer to the
installing problem you are having. Usually, the thing that causes a
crash on installation is that you receive a DatabaseInitialize launch
code. You must make sure that any code that handles that launch code is
in segment 1 and does not use globals. But the fact that it works on a
Palm V and not a PalmVx has me a little baffled.

Shannon

In article <[EMAIL PROTECTED]>, Chris Tutty
<[EMAIL PROTECTED]> wrote:

> "thomas" <[EMAIL PROTECTED]> wrote
> > > Check out this information in the knowledge base:
> > > <http://oasis.palm.com/dev/kb/papers/1469.cfm>
> > >
> > What means the sentence "comment out the code in PilotMain() that handles
> the
> > sysAppLaunchCmdNormalLaunch command" ?
> >
> I think  the idea is that you comment out the code *you* call
> during a normal start (so everything below that case statement ) and
> then the map file will show you what the compiler leaves in the 'code'
> segment.  This will, I assume, be everything called by the various
> startup sequences which therefore *must* be in the first segment.
> Once you've identified the critical code you uncomment your normal
> launch again and recompile to return your app to normal functioning.
> 
> Make sense? (I'm not really explaining it very well)
> Chris Tutty


-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to