Re: gathering info on a gnome druid
- From: jrb redhat com
- To: "Jeremy Savoy" <jsavoy us ibm com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: gathering info on a gnome druid
- Date: 26 Mar 2001 13:57:31 -0500
"Jeremy Savoy" <jsavoy us ibm com> writes:
I am writing a druid app and I want to gather data from the user on one of
the pages and then have this info for later use (perhaps a GList). I would
think I should do this with a signal connect from the next button on the
druid so that when the user has made choices and entered text, the values
aren't stored until he / she is done. My questoin is how do I send multiple
values to a signal handler when it apears you can only one in a
gtk_signal_connect ??
ex:
gtk_signal_connect (GTK_OBJECT (druidpagestandard1), "next",
GTK_SIGNAL_FUNC (on_druidpagestandard1_next),
NULL);
I tried putting the separated values in a GList and sending that but it was
somewhat flacky, I assume because values are changing and are not all
stored at the same time. Any suggestion??
Hi Jeremy,
There are a number of ways to do this. The most common is to
encapsulate your data in your druid in a struct, and pass that around as
your user_data. Another option (which is fine for quick and dirty
dialogs and the like) is to use gtk_object_[gs]et_data. As an example:
gtk_object_set_data (GTK_OBJECT (druid), "foo", foo);
gtk_object_set_data (GTK_OBJECT (druid), "bar", bar);
...
foo = gtk_object_get_data (GTK_OBJECT (druid), "foo");
bar = gtk_object_get_data (GTK_OBJECT (druid), "bar");
Thanks,
-Jonathan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]