help with a little entry program
| From: | Iuri Fiedoruk | Date: | Tue, 06 Mar 2001 11:07:59 +0000 |
| Subject: | help with a little entry program | ||
| Groups: | php.gtk | ||
| Request: | Send a blank email to php-gtk+get-389@lists.php.net to get a copy of this message | ||
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?
--
Iuri Fiedoruk
Santa Maria, RS, Brazil