Problems with gtklist
- From: Brooklyn Linux Solutions <ruben mrbrklyn com>
- To: ruben mrbrklyn com
- Cc: gtk-app-devel-list gnome org
- Subject: Problems with gtklist
- Date: Thu, 24 May 2001 21:48:24 -0400
Hello
I'm trying to load a gtk list and I'm getting an error that gtkbin
Gtk-CRITICAL **: file gtkbin.c: line 217 (gtk_bin_add): assertion
`bin->child == NULL' failed.
Gtk-CRITICAL **: file gtkbin.c: line 217 (gtk_bin_add): assertion
`bin->child == NULL' failed.
I created an array of structs
GtkWidget *listitem[11];
gint i;
listbox = gtk_list_new();
gtk_list_set_selection_mode(GTK_LIST(listbox),
GTK_SELECTION_MULTIPLE);
listitem[0] = gtk_list_item_new_with_label("January");
listitem[1] = gtk_list_item_new_with_label("Febuary");
listitem[2] = gtk_list_item_new_with_label("March");
listitem[3] = gtk_list_item_new_with_label("April");
listitem[4] = gtk_list_item_new_with_label("May");
listitem[5] = gtk_list_item_new_with_label("June");
listitem[6] = gtk_list_item_new_with_label("July");
listitem[7] = gtk_list_item_new_with_label("August");
listitem[8] = gtk_list_item_new_with_label("September");
listitem[9] = gtk_list_item_new_with_label("October");
listitem[10] = gtk_list_item_new_with_label("November");
listitem[11] = gtk_list_item_new_with_label("December");
for(i=0; i<12; i++){
gtk_container_add(GTK_CONTAINER(listbox), listitem[i]);
gtk_widget_show(listitem[i]);
}
It works if I don't use the array. I suspect something is wrong in the
array which I'm missing.
Ruben
--
Brooklyn Linux Solutions
http://www.mrbrklyn.com
http://www.brooklynonline.com
1-718-382-5752
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
--
Brooklyn Linux Solutions
http://www.mrbrklyn.com
http://www.brooklynonline.com
1-718-382-5752
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]