(oops bad operations)

So say I have this C GObject (for which python bindings are provided):

typedef struct _MyObject MyObject
typedef struct _MyObjectClass MyObjectClass
struct MyObject {
    Gobject parent;
}

struct MyObjectClass {
    GObjectClass parent_class;

    void (*my_method) (void);
}

and I define this python object deriving from MyObject:

class MySubObject(module.MyObject):
   def __init__(self):
       module.MyObject.__init__(self)

How can I define the my_method() method for this derived class ? And
optionally how do I link to the parent implementation ?

Hope this is clear,

cheers,
Christophe



On Mon, Sep 22, 2008 at 4:07 PM, Christophe Dehais
<[EMAIL PROTECTED]> wrote:
> Hi everyone!
>
> pardon me if this is a silly question, but how can GObjects virtual
> methods be overriden ?
>
> Say I have this GObject:
>
> typedef struct _MyObject MyObject
> typedef struct _MyObjectClass MyObjectClass
>
> struct MyObject {
>
> }
>
_______________________________________________
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