Re: help with a little entry program

From: Date: Tue, 06 Mar 2001 14:13:14 +0000
Subject: Re: help with a little entry program
References: 1  Groups: php.gtk 
Request: Send a blank email to php-gtk+get-393@lists.php.net to get a copy of this message
I think you should be adding the entry to the box and the box to the window. something like: $box1 = $new GtkVBox(FALSE,0); $entry = $new GtkEntry(); $box1->pack_start($entry); $window->add($box); $window->show_all(); not sure all the syntax is right, but I hope you get the idea. --rdp On Tue, 6 Mar 2001, Iuri Fiedoruk wrote: > I created the script: > > $window = &new GtkWindow(GDK_WINDOW_TOPLEVEL); > $window->connect('destroy', 'destroy'); > $window->connect('delete-event', 'delete_event'); > $window->set_usize(250,200); > > /* creates box */ > $box1 = &new GtkVBox(FALSE, 0); > $box1->set_border_width(0); > $window->add($box1); > > /* creates entry */ > $entry = &new GtkEntry(); > $box1->pack_start($window, TRUE, TRUE, 0); > $window->add($entry); > > /* Show the window and all its child widgets. */ > $window->show_all(); > > > But got: > bart@avalon:~/php-gtk/test$ php entry.php > Gtk-CRITICAL **: file gtkwidget.c: line 3354 (gtk_widget_set_parent): > assertion > `!GTK_WIDGET_TOPLEVEL (widget)' failed. > Gtk-CRITICAL **: file gtkbin.c: line 217 (gtk_bin_add): assertion `bin->child > == NULL' failed. > Segmentation fault (core dumped) > > > Does someone know what's wrong on my program? > -- Rich Payne rpayne@alphalinux.org www.alphalinux.org

« previous php.gtk (#393) next »