Automatic save and load of a model to a particular file

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Automatic save and load of a model to a particular file

Günther Schmidt
Hi,

my application's main window is a document shell. How do I make my
application load or save the model to a predetermined file/location
without any user interference?

ie. when the application starts, the last saved model is automatically
loaded and when the application closes the model is also saved.

Also how can I determine the path to be different in a multi user
environment so that each user would have his/her own data?

Günther


Reply | Threaded
Open this post in threaded view
|

Re: Automatic save and load of a model to a particular file

hboon@motionobj.com
Günther Schmidt wrote:
> Hi,
>
> my application's main window is a document shell. How do I make my
> application load or save the model to a predetermined file/location
> without any user interference?
>
> ie. when the application starts, the last saved model is automatically
> loaded and when the application closes the model is also saved.

What I did was to use OmniBase although I did not use a document shell.
Just create a transaction upon startup and commit when the application
is closed. You can selectively do commits while the application is
running, say when the user chooses to save. This combination made it
quite simple and transparent to handle serialization.

HweeBoon