Discussion:
wxWGTK: Best way to save/restore Application session to/from file?
Mahmoud Eltahawy
2014-05-08 09:58:26 UTC
Permalink
Hi All,
I have an application with wxGTK3.0.0 and I am searching for a way to save
the current application session to file then restore it later ?
Can you please guide me for the best way to do this?


Thanks
Mahmoud
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Marian 'VooDooMan' Meravy
2014-05-12 01:44:01 UTC
Permalink
Greetings,
Post by Mahmoud Eltahawy
Hi All,
I have an application with wxGTK3.0.0 and I am searching for a way to save
the current application session to file then restore it later ?
Can you please guide me for the best way to do this?
I'm facing the same problem, so this interesting question bugs me as
well. So far I have used my own serializer function for this with
success. Is there any functionality in WX I can use better?

best,
vdm
.
Steve Barnes
2014-05-12 05:09:08 UTC
Permalink
Post by Marian 'VooDooMan' Meravy
Greetings,
Post by Mahmoud Eltahawy
Hi All,
I have an application with wxGTK3.0.0 and I am searching for a way to save
the current application session to file then restore it later ?
Can you please guide me for the best way to do this?
I'm facing the same problem, so this interesting question bugs me as
well. So far I have used my own serializer function for this with
success. Is there any functionality in WX I can use better?
best,
vdm
.
I suggest that you take a look at wxPersistence
<http://docs.wxwidgets.org/trunk/overview_persistence.html> for your
controls as a starting point.

Gadget/Steve
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Mahmoud Eltahawy
2014-05-14 18:22:21 UTC
Permalink
Hi Steve, I tried to run the example of wxPersistenceManager , but I got
this error
error: cannot call member function 'bool
wxPersistenceManager::RegisterAndRestore(T*) [with T = wxNotebook]' without
object

can you please provide me with little code to save and restore the state of
wxNotebook for example?

Many thanks
Mahmoud
Post by Marian 'VooDooMan' Meravy
Greetings,
Hi All,
I have an application with wxGTK3.0.0 and I am searching for a way to save
the current application session to file then restore it later ?
Can you please guide me for the best way to do this?
I'm facing the same problem, so this interesting question bugs me as
well. So far I have used my own serializer function for this with
success. Is there any functionality in WX I can use better?
best,
vdm
.
I suggest that you take a look at wxPersistence<http://docs.wxwidgets.org/trunk/overview_persistence.html>for your controls as a starting point.
Gadget/Steve
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Eric Jensen
2014-05-14 19:48:30 UTC
Permalink
Hello Mahmoud,

Wednesday, May 14, 2014, 8:22:21 PM, you wrote:

ME> Hi Steve, I tried to run the example of wxPersistenceManager , but I got
ME> this error
ME> error: cannot call member function 'bool
ME> wxPersistenceManager::RegisterAndRestore(T*) [with T = wxNotebook]' without
ME> object

ME> can you please provide me with little code to save and restore the state of
ME> wxNotebook for example?

This may help:
http://forums.wxwidgets.org/viewtopic.php?f=1&t=39251

Eric
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Vadim Zeitlin
2014-05-14 21:45:17 UTC
Permalink
On Wed, 14 May 2014 11:22:21 -0700 (PDT) Mahmoud Eltahawy wrote:

ME> can you please provide me with little code to save and restore the state of
ME> wxNotebook for example?

Have a look at the widgets sample.

HTH,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Marian 'VooDooMan' Meravy
2014-05-12 05:42:08 UTC
Permalink
Greetings,
Post by Marian 'VooDooMan' Meravy
Greetings,
Post by Mahmoud Eltahawy
Hi All,
I have an application with wxGTK3.0.0 and I am searching for a way to save
the current application session to file then restore it later ?
Can you please guide me for the best way to do this?
I'm facing the same problem, so this interesting question bugs me as
well. So far I have used my own serializer function for this with
success. Is there any functionality in WX I can use better?
note to self: no.

I recommend you to use your own serializer class (and possibly) use
multiple inheritance to achieve this goal.

PS: WX tries hard to be MFC replacement on Windows, and IIRC MFC has
serializer class as the base class of all classes (but I might be wrong,
I'm not MFC guru). So it might be good approach to implement this to WX
and create patch for WX. Though it is a big challenge and not so easy...

So far, I implemented "render log", where every user's action is
written, and in "recovery state" it is sending events to controls from
the render log.

best,
vdm
.
Loading...