PDA

View Full Version : Saving program state



zagieman
April 13th, 2008, 04:42 AM
I have written a simple program using gtkmm which has a few check and text entry widgets. I am unsure how to make it so that when the program is closed, it resumes in the same state as when it was closed.

Would this involve a separate file that I need to write out to? If so how would I go about this?

Can+~
April 13th, 2008, 05:06 AM
Store a configuration file, in any format, a plain text can do the job prety easily, like:

something=value

Read the file on start, then implement those values on the interface, there's loads of methods in gtk that are basically "set_widget_to_some_state". Probably there's a library out there that can do that job for you.

Wybiral
April 17th, 2008, 07:03 PM
What language are you using?