Using GObject interfaces in Python (Mx.Draggable in this case)
- From: Nox Deleo <noxdeleo googlemail com>
- To: clutter-list gnome org
- Subject: Using GObject interfaces in Python (Mx.Draggable in this case)
- Date: Wed, 2 Jan 2013 15:09:50 +0000
Over the last few months I've been getting my head around GObject using it with GStreamer, GTK and now Clutter/Mx, but one thing I've never gotten is how the interfaces work in Python. I'd thought it was just a simple case of subclassing from the interfaces with an appropriate base class (e.g. atm I'm trying Clutter.Actor with Mx.Draggable), but I think I'm missing something.
If I do something like:
class MyActor(Clutter.Actor, Mx.Draggable)
def __init__(self):
super(Clutter.Actor, self).__init__()
...I get errors like this:
Warning: Object class gui+LibraryViewGridItem doesn't implement property 'axis' from interface 'MxDraggable'
If I then add these properties manually to my class, these errors go away, but the draggable interface doesn't seem to work. Nothing happens when I try to drag my actor, and the drag-begin signal never fires (although it gets connected properly as it does seem to exist in the new class). It makes me think I'm missing some sort of initialization code for these interfaces.
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]