Re: Text box problems
- From: Chris Nuernberger <nuernber colorado edu>
- To: Maher Awamy <muhri muhri net>
- Cc: gtk-app-list <gtk-app-devel-list gnome org>
- Subject: Re: Text box problems
- Date: 12 Jan 2001 15:58:37 -0700
Yes, actually I am just playing around and writing a server application
that forks (actually creates a posix thread in Linux, which is very
close to forking as I understand it) each time a client comes. It
creates its own virtual 'session', this session is what is spawning the
new top level window; so perhaps that is why I am getting the error. I
just got the book on Xlib, perhaps it has an explanation for the error
that I can backtrack into the gtk code. Thanks, Chris
On 11 Jan 2001 16:00:01 -0600, Maher Awamy wrote:
Look at this program at the buttom, you can create as many toplevel windows
without getting any xlib errors, you must be doing something wrong in your
code, I get those type of errors when doing forks. Are you doing something of
that type?
Maher
------ cut here -----
/* gcc -o testtextbox testtextbox.c `gtk-config --cflags --libs` */
#include <gtk/gtk.h>
static void make_textbox()
{
GtkWidget *window, *textbox, *button, *vbox, *sw;
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
textbox = gtk_text_new(NULL,NULL);
button = gtk_button_new_with_label("Create Another one!");
vbox = gtk_vbox_new(0,0);
sw = gtk_scrolled_window_new(NULL,NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_signal_connect(GTK_OBJECT(button), "clicked",
GTK_SIGNAL_FUNC(make_textbox), NULL);
gtk_text_set_editable(GTK_TEXT(textbox), TRUE);
gtk_container_add(GTK_CONTAINER(window), vbox);
gtk_container_add(GTK_CONTAINER(sw), textbox);
gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, FALSE);
gtk_box_pack_start(GTK_BOX(vbox), button, TRUE, TRUE, FALSE);
gtk_widget_show_all(window);
return;
}
gint main(gint argc, gchar *argv[])
{
gtk_init(&argc,&argv);
make_textbox();
gtk_main();
return 0;
}
/* end */
On 11 Jan 2001 14:48:47 -0700, Chris Nuernberger said:
Here is a really basic question about text boxes. When I use one on
my first top-level window then it works fine but if I make another
top-level window and put a new text widget in it then I get an Xlib
error, an asynchronous reply. Thanks for some help, Chris
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
--
http://www.muhri.net -- muhri muhri net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]