> From: S Boedecker
>
> I'm stumped trying to determine why the following code
> in a DoFind function would fail during a global find
> launched from outside my application but works when
> the global find is launched within my application.
> The failure says I am accessing global variables
> and the failure goes away when the following code
> is removed.
>
> Char header[]="testApp";
> if (FindDrawHeader(findParams, header))
> return;
>
>From the Palm OS Companion:
"In most cases, when you respond to other launch codes, you are not able to
access global variables. Global variables are generally only allocated after
an application receives sysAppLaunchCmdNormalLaunch (see Listing 3.2) or
sysAppLaunchCmdGoto."
(This also applies to static local variables, which are stored with the
global variables.)
The error message is very clear. You can't access global variables during
the sysAppLaunchCmdFind launch code. You should check your PilotMain
carefully to make sure you aren't trying to access globals any time they
aren't available. In your code, for example, depending on where you defined
header[], it could easily be a global variable.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/