Andre Augusto wrote:
I want to commute between my application and for example a web-browser, and then back to my app. How can I mantain the state, i.e., the same form I was when got out of my application? For example, I want to do the same that the program "Photos" that came with PalmOS v5.2 do. If I'm viewing a foto in fullscreen, and get out of that program, when I go back to it, the image in fullscreen appears again!

You have to store all the state information yourself.  Put it in a
database or in the prefs database.  Every time you make some kind
of change that counts as major enough to remember it, you have to
update some struct (or string or something).  Then, when your app
exits, write that out.  When your app starts, check and see if
the previous state is where you would've written it out, check
if it makes sense (isn't corrupted, doesn't correspond to some
data that no longer exists), and if so, start your app up and
go back to whatever form.

This gets somewhat tricky if you have lots of forms open at once
and you want to preserve the whole status of everything so that
you have the same set of windows open.  If you look carefully,
you'll notice that most apps don't get that fancy:  if there is
a dialog or other type of obscure window open, then when you
leave the app and return, you don't wind up back exactly where
you were when you left.  You're just in the general ballpark.

  - Logan

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

Reply via email to