GtkCList recreation only once.

From: Date: Thu, 03 Oct 2002 13:04:58 +0000
Subject: GtkCList recreation only once.
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-2504@lists.php.net to get a copy of this message
Ok, here's my scenario: $listErgebnis = $glade_app->get_widget('listErgebnis'); // stands right bevor app_init(); this is the list, wherein the result // should be displayed. this happens in global namespace, cause I dont // believe, that i'll find it, after recreation, with get_widget. I've got a Textfield for entering a MySQL-Query, the query is sent to the server, brings back the information, then: global $listErgebnis; // gets the list into function namespace $scw2->remove($listErgebnis); // removes the list from the scrolledwindow (scw2 is the pointer to this // ScrollingWindow) for($i=0;$i<mysql_num_fields($result);$i++) { $fnames[] = mysql_field_name($result,$i); } // get's the field-names into an array $listErgebnis = &new GtkCList(mysql_num_fields($result),$fnames); // creates a new GTKCList $scw2->add($listErgebnis); // and adds it to the scrollwin $listErgebnis->show(); // this one shows it after that the list is filled with the values. All that works perfect, but only one time! after the second try, i get an Gtk-CRITICAL **: file gtkcontainer.c: line 730 (gtk_container_remove): assertion `widget->parent == GTK_WIDGET (container)' failed. Gtk-CRITICAL **: file gtkscrolledwindow.c: line 899 (gtk_scrolled_window_add): assertion `bin->child == NULL' failed. Any Idea's someone? Robert -- Das Gefängnis ist in deinem Kopf, könnt ihr nicht sehen, dass ich frei bin? - Charles Manson

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