initializing python objects derived from gnome.canvas.CanvasItem

Sorry if this is a dumb question.  I'm still climbing the gtk/gnome
learning curve.

I'm doing some gnome canvas stuff in python.  I've created a python class
that is derived from CanvasItem.  (Not directly from CanvasItem, but from
some of the stock canvas items: e.g., CanvasRect.)

How do I initialize it?

Defining __init__ doesn't do any good, of course, because you don't create
new CanvasItems by calling the class, you create them by calling the add
method, and that doesn't call init.

I think I could figure out how to do it from C -- I've found where the
gobject class info keeps it's init routine.  But I haven't been able to
figure out how to do it in python.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]