[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: gtk_main
- From: Havoc Pennington <hp redhat com>
- To: gtk-app-devel-list redhat com
- Subject: Re: gtk_main
- Date: Sat, 9 Oct 1999 14:24:21 -0400 (EDT)
On Sat, 9 Oct 1999, Alex Graf wrote:
> ...
> pack and show the window + widgets
> *** including a callback to make OK button call gtk_main_quit ()
> ...
> gtk_main ();
> strcpy (s, gtk_entry_get_text (GTK_ENTRY (text_box)));
> return;
> }
>
> This pops up the window just fine, but the call to gtk_entry_get_text
> fails. I'm guessing that I cannot access the widgets after gtk_main_quit
> is called.
>
Nope, should be able to access widgets after quitting. What do you mean
"failed"? Can you post the exact error message, and/or a small compilable
program demonstrating the problem?
> I hope you see what I'm trying to accomplish here. How can I do this?
> Opening an inner gtk_main() loop was the only way I could think of to make
> control get back to the inputbox() function to create the return value.
>
This is the correct way to do it, gtk_main() is recursive for that reason
(but be careful not to let the user invoke the wrong gtk_main_quit(), such
as the Exit menu item for your application...)
> Also, I see some other functions in gtkmain.h, but could not find
> documentation for them. How can I find out about them?
>
If they aren't in www.gtk.org/rdp or the GTK tutorial or my book
(developer.gnome.org/doc/GGAD) then they are probably undocumented, but I
would expect them to be in one or more of those places.
Havoc
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]