gtk_tree_view_column query.



Hello,
  I'm working on some aspects of gtk-fortran (an interface of GTK+ to
Fortran95/2003), and so need to implement things without using varargs
routines. However I'm getting unexpected behaviours. I don't think the
problem is in the Fortran interface as I can reproduce the errors in
C-examples.

The first is in setting up the column attributes, the original C code was:

  column = gtk_tree_view_column_new_with_attributes("#", renderer,
                                                      "text", 0, NULL);

Which if I interpret the manual correctly ought to be replaceable by:
    column = gtk_tree_view_column_new();
    gtk_tree_view_column_set_title(column, "#");
    gtk_tree_view_column_add_attribute(column, renderer, &
         & "text", 0);

But the latter gives an assertion error:
(list1:6044): Gtk-CRITICAL **:
gtk_tree_view_column_cell_layout_add_attribute: assertion `info !=
NULL' failed


The second comes when trying to add a value to a column, the original was:
    gtk_list_store_set(store,&iter, 0, nrow, -1); /* The index column */

Which (again if I'm interpreting the manual right) should be equivalent to:
    gtk_list_store_set_value(store, &iter, 0, (Gvalue *) &nrow);

but instead the latter gives a segfault
0x00007ffff55effc9 in type_check_is_value_type_U (value=0x7fffffffdcac)
    at /build/buildd/glib2.0-2.26.1/gobject/gtype.c:4073


Does anybody see a grave error in interpreting the manual or is there
a real problem with some of these routines?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]