GNOME Bugzilla – Bug 549191
Constructor of gtk.TreeView raises TypeError when model is None
Last modified: 2008-08-27 21:42:32 UTC
I can call gtk.TreeView() without any argument and it works, but if I call gtk.TreeView(None) it doesn't and gives a TypeError: TypeError: could not convert parameter 'model' of type 'GtkTreeModel' This is especially annoying if you want to sub-class gtk.TreeView class MyTreeView(gtk.TreeView): def __init__(self, model=None): gtk.TreeView.__init__(self, model) # Won't work if model is None ....
This is not specific to gtk.TreeModel actually. Patch in a minute.
Created attachment 117359 [details] [review] fix Add handling of None to pyg_value_from_pygobject() in G_TYPE_INTERFACE branch.
Sending ChangeLog Sending gobject/pygtype.c Transmitting file data .. Committed revision 954. 2008-08-28 Paul Pogonyshev <pogonyshev@gmx.net> Bug 549191 – Constructor of gtk.TreeView raises TypeError when model is None * gobject/pygtype.c (pyg_value_from_pyobject): Handle None in G_TYPE_INTERFACE branch.