> If you think C would solve that, you're mistaken. Globals are never
> available during a subcall, and the choice of programming language makes

Ah, so much for that theory.  Are there other restrictions in C++ when a
program is called from anything other than sysAppLaunchCmdNormalLaunch?  Or
is it just globals and static data members that aren't available?

> But, we really need to know what you want to do before we can give you
> the best solution.

I have an app that starts itself when it receives the sleep notification.
But the app is rather large and I thought it might be nice to allow the user
to leave the app on his storage card when it wasn't running (especially if
the "respond to sleep notification" was temporarily disabled).

Accordingly, I wrote a tiny app that:
a. registers itself for the sleep notification
b. when it get's said notification, it checks to see if The Big App is
already in local memory.  If so, it quits, assuming that The Big App will
take care of everything.
c. if not, it checks if there's enough local memory available and copies The
Big App to local memory and launches it.

Now that I actually give it some thought, I'm not entirely sure that this
even makes sense as something a user would want to do.
This might just be an intellectual excercise.

One other question:
Is there any way to mount a directory on your PC from the palm (while the
palm is in the cradle obviously)?  I could do communication with the PC via
TCP/IP, but using VFS to see the PC's file system would be even better.

Matt Henry

"Dave Carrigan" <[EMAIL PROTECTED]> wrote in message
news:92790@palm-dev-forum...
>
> On Thu, 2002-08-01 at 13:18, Matthew Henry wrote:
>
> > I tried using SysAppLaunch to launch it as a sub app.  Theoretically
when
> > the sub app quits I could then delete the local DB.  But SysAppLaunch
> > appears not to work with C++ applications; the global variables in the
"sub"
> > app do not get initialized and the app crashes.  Grr.  Any new programs
I
> > write for the Palm will be written in C.
>
> If you think C would solve that, you're mistaken. Globals are never
> available during a subcall, and the choice of programming language makes
> no difference.
>
> > I tried using SysUIAppSwitch to have the "sub" app switch back to my
initial
> > app when it is done.  The initial app can then delete the "sub" app.
That
> > *almost* works.  But if you, say, hit the palm's "address" button when
the
> > sub app is running, the initial app will get switched to and the sub app
> > will get deleted, but the address application will never be called.
>
> There's no good general way to do this, and the appropriate approach
> depends on what exactly you're trying to accomplish. If you know for
> sure that the user will never want this card-based app to be installed
> on the handheld, then one possible approach is just to copy the app over
> and launch it, and the next time your app runs, it should check for the
> existence of the other app and delete it. If you don't want the user to
> see the app in the launcher, set the hidden bit.
>
> But, we really need to know what you want to do before we can give you
> the best solution.
>
> --
> Dave Carrigan
> Seattle, WA, USA
> [EMAIL PROTECTED] | http://www.rudedog.org/ | ICQ:161669680
> UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-C++-DNS-PalmOS-PostgreSQL-MySQL
>
> Dave is currently listening to Carter the Unstoppable Sex Machine -
> Billy's Smart Circus (30 Something)
>
>
>
>



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

Reply via email to