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 "<stdin>", 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

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to