[pygtk] Getting GnomeCanvasItem's parent
=?iso-8859-1?Q?Gergely_G=E1ti?=
nyenyec@mnet.hu
Fri, 11 Aug 2000 17:27:31 +0200 (CEST)
Hi,
I'm currently learning GnomeCanvas and just for fun I tried to port
testgnome.c to Python. Is someone else working on this?
Anyway, my problem is that in C I could get the parent of a GnomeCanvasItem
using
GnomeCanvasItem* parent = item->parent;
However I couldn't figure out how to do this in Python except for calling
item.set_data('parent', parent)
This works, but I'm not sure it's the right thing to do. (Circular references?)
Same goes for item.canvas and the bounding box (see struct _GnomeCanvasItem
in gnome-canvas.h).
Thanks,
Gergely
"We must be the change we wish to see in the world." -Gandhi