Hi SD,

First, an important disclaimer for anyone jumping in: I'm still assuming there are differences in SysUIAppSwitch between different versions of the OS, and that this discussion presumably applies to the older versions. That said:


I don't know if that's correct or not, but I know that in my use of SysUIAppSwitch, its behavour seems to be pretty consistent from OS2 through OS5.

I see what you're saying.  The lay-man summary: when we're talking about this "next 
app to launch" global, that is one powerful variable.  It's always pointing 
somewhere, and that's going to be the next app to run after the current one quits.

Right.

During most apps, it's pointing to the App Launcher, ready to return after the app quits.

I don't know that I agree with this. It may be simply pointing back at itself.

And when you do a SysUIAppSwitch from your own App A to App B, the "next app to launch" becomes App A since, well, the OS is designed to point that variable *somewhere*, and since the App Launcher didn't invoke App B, why return there?


My take on it is that you point it to AppB, then try to launch AppB. If it succeeds, AppB launched and AppA has relinquished all control of what happens in AppB. If it fails, you return to AppA, because you need somewhere to go.

Once AppB has control, exiting from THAT app will take you wherever it's told to go from that point, with no reference back to what you did in AppA at all. Remember that you don't really "exit" from your app, so much as "enter" another app. The system is FIRST told where to go (by the user selecting an app, or programatically by SysUIAppSwitch) , THEN your app gets an appStopEvent, so that it can clean up and stop.

But that's what I want! Now that we've established what's going on: Is there any other way to launch App B from App A and set the "next app to launch" to the App Launcher*? *(or, more specifically, whatever app it was that launched App A?)


Personally, I think that you'd have to keep track of which apps are opening/closing, and manage that process yourself. Remember that, while in AppB, the user can choose to hit whatever hardbutton or control that they want, and that will tell the system to lanch a specific app. The only way to overcome that is to spot the app changes (probably from within AppA), and jump in and take control at that time.



Bob.

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

Reply via email to