Re: reinitialize application
- From: "David Necas (Yeti)" <yeti physics muni cz>
- To: Andreas Kotowicz <kotoml mynetix de>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: reinitialize application
- Date: Fri, 10 Mar 2006 20:19:26 +0100
On Fri, Mar 10, 2006 at 07:40:25PM +0100, Andreas Kotowicz wrote:
so what I'm looking after is a way to clear all those entry fields any
other variables which might have changed during the running program.
so just reinitialize the app :)
If you want to reset state of some widgets to a predefined
state, just iterate through them and set their state. Or
destroy them and construct anew.
However, if you want to `clear any other variables that
might have changed', that is get your program to the state it
started in, you can actually restart it. Save the contents
of argv when the program starts, and then execv() self to
restart. Of course, there are still things like open files
that are not reset this way and other possibilites of subtle
problems. You can take care of them manually or use other
means to reset them (e.g., fcntl() to set close-on-exec flag
on open files).
Yeti
--
That's enough.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]