GNOME Bugzilla – Bug 631538
Wrong parameters for gtk_tree_view_column_set_cell_data_func
Last modified: 2010-10-25 16:59:23 UTC
Created attachment 171834 [details] Sample code Previously, you could call set_cell_data_func with two arguments, a CellRenderer and a Callback, now I get: TypeError: set_cell_data_func() takes exactly 4 argument(s) (3 given) Looking at the C API of this function I thought the 3rd argument might be function data, but this gives: TypeError: argument 3: Must be callable, not NoneType
Example works for me. Might be an issue with the annotations. Are you linking against Gtk 2.0 or 3.0? Note we are only really supporting 3.0. As for needing to supply the user data, it needs to be marked as optional in Gtk. I'll look into doing that.
That's with gtk 2.22.0. The idea was to port to gobject-introspection first, and then to gtk 3.0, but now I guess I have to do both simultaneously.
Ok, there is no way to specify optional parameters (well there is DEFAULT but it isn't implemented yet). You will have to supply a user_data parameter. Overrides that fix this will not be accepted because it really needs to be fixed in introspection itself.
Default parameters would be nice to have. Especially, the pack_* functions used to have default parameters and keyword arguments, but I guess the latter is a different matter.