Frame + Button

From: Date: Wed, 01 Oct 2003 11:24:45 +0000
Subject: Frame + Button
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-3933@lists.php.net to get a copy of this message
I'm new with php-gtk so please don't laugh if you fnd this silly I'm trying to do something like the alert() function from JavaScript( I want a popup window with sometext in it and button that closes the window). My problem is that when I add the button I get the following error: "Gtk-CRITICAL **: file gtkbin.c: line 217 (gtk_bin_add): assertion `bin->child == NULL' failed." Here is my code: $window= &new GtkWindow(); $windows['serverWindow'] = &$window; $window->set_name('checkServer'); $window->connect('delete_event', 'delete_event'); $window->set_policy(false, true, false); $window->set_title('Query Result'); $window->set_usize(300, 70); $window->set_uposition(220,85); $box= &new GtkVBox(); $window->add($box); $frame= &new GtkFrame('Database Server Connection'); $box->pack_start($frame, true, true, 1); $label=new GtkLabel(); if ($db->checkConnection()) { $label->set_text("Connection status: connected \n Conection time:".$db->getTime(2).' seconds'); } else $label->set_text('Connection status: not connected'); $frame->add($label); $button= &new GtkButton('OK'); $button->connect('clicked', 'close_window'); $frame->add($button); $window->show_all(); If anyone knows what I'm doing wrong please tell how to make it work.

« previous php.gtk.general (#3933) next »