In article <91053@palm-dev-forum>, [EMAIL PROTECTED] says... > > 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.
This isn't a bug. The system only knows about one parent at a time for SysUIAppSwitch. When you call this, an appStopEvent is posted to your event queue, and the global system variable indicating the next program is set to the app you specified. Your application exits, the system gets control, it checks the variable, and launches the next app, putting the app that just exited into the variable to be relaunched if the new app exits. The solution is to have the second application call SysUIAppSwitch to set a new program to exit to it when it finishes. You may just want to fetch the launcher's creator ID from the system preferences and use that. Look at Preferences.h to find the right parameter to use to get this value. -- Ben Combee <[EMAIL PROTECTED]> CodeWarrior for Palm OS technical lead Get help at http://palmoswerks.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
