On Thu, 2003-03-27 at 01:53, Oliver M. Haynold wrote:
> Hello:
>
> I have a problem understanding PyGtk and couldn't find anything in the
> documentation (presumably because I searched in all the wrong places). I
> don't understand how exactly one can tell PyGtk that a new class
> implements some GInterface.
>
> Specifically I have a tree model which works very fine and it subclassed
> like this:
>
> class TopicsTreeModel(gtk.GenericTreeModel):
> # implementation goes here
>
> Now I would like to add drag and drop functionality, which (for the role
> as a D&D source) requires my new class to implement gtk.TreeDragSource.
> Perhaps the most pythonic way of doing this would be to inherit from
> gtk.TreeDragSource like this:
>
> class TopicsTreeModel(gtk.GenericTreeModel, gtk.TreeDragSource):
> # implementation goes here
>
> However, that raises an error:
>
> File "", line 15, in ?
> TypeError: multiple bases have instance lay-out conflict
>
> Is there something I don't understand about the PyGtk implementation of
> GInterfaces? Any help or reference to the appropriate part of the
> documentation would be greatly appreciated.
>
> Yours,
>
> Oliver
>
I can't answer your question but I'm very interested in this topic, too.
I'd like to subclass gtk.Combo and implement gtk.CellRenderer to use it
within a tree view. So if anyone knows how to handle Glib interfaces I'd
very appreciate it.
Thomas
___
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/