[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-app-devel
Subject:    Re: gtk_tree_view_column_set_cell_data_func gives GTK-CRITICAL error
From:       James Steward <jamessteward () optusnet ! com ! au>
Date:       2011-11-30 20:33:04
Message-ID: 4ED69300.1080505 () optusnet ! com ! au
[Download RAW message or body]

On 30/11/11 20:04, Tadej Borovšak wrote:
> Hi.
>
> 2011/11/30 James Steward<jamessteward@optusnet.com.au>:
>> col = gtk_tree_view_insert_column_with_attributes (
>>                 GTK_TREE_VIEW (view),
>>                 -1,
>>                 "Title",
>>                 renderer,
>>                 "text", i,
>>                 "strikethrough", j,
>>                 "background", k,
>>                 "background-set", TRUE,
>>                 NULL);
>>
>> gtk_tree_view_column_set_cell_data_func(
>>                 gtk_tree_view_get_column(GTK_TREE_VIEW(view), col),
>>                 renderer,
>>                 render_float,
>>                 GINT_TO_POINTER(i),
>>                 NULL);
>
> IIRC, gtk_tree_view_insert_column_with_attributes() returns number of
> columns and gtk_tree_view_get_column() expects to get column number
> where first column is 0. So you may be off-by-one in your call to
> gtk_tree_view_column_set_cell_data_func().

Well spotted!  Thanks very much.

Regards,
James.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic