I was trying to write an app which calls a child app.  I wanted the parent
app to die and launch the child app (passing some data at launch).  I didn't
want to return to the parent app after the child app was done; ie. like a
fork/exec where the parent exits.

According to the manual, SysUIAppSwitch() is the API of choice.  It states
that it tries to make the current app quit, and then launch the child app.
Neither of my apps have an event loop or do any GUI stuff.  Everything seems
to work fine at first:
The parent app calls SysUIAppSwitch(), the parent app exits, the child app
launches, does its thing and then the child app exits.  Then the weird part
happens.  The parent app is relaunched.  Obviously without anyway for the
parent app to know that this is the second time it is being launched, an
infinite loop of launching begins between the parent and child apps.  The
manual is inconsistent with the behavior.  I've tested this on a 3.3 PalmV,
and 3.3, 3.5 and 4.0 POSE with the same results.  No word from Palm on the
status of this bug.

What gives?  Any suggestions on why this happens?  Any suggestions on how to
get this to work?  Eventually I will have the child app created by the
parent app, have the parent launch the child app (which does some db work)
and then I want the child app to delete the parent app completely.  I've
reviewed some of the 'suicide' posts on this.  I haven't gotten that far
yet.  Right now I have 2 independent .prc files loaded separately - one
parent that simply SysUIAppSwitch() to the child .prc file.  The child prc
file exits and then for some reason the parent is re-launched. Anyone have
example code that works that I could run and see for myself; right now I'm
convinced its a bug?

PS: Please CC my e-mail below.

TIA,

--Bill McDonald
*******************************
* [EMAIL PROTECTED]
*******************************



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

Reply via email to