[pygtk] Redefining the problem: Related to inheritance

John Ehresman jpe at wingware.com
Tue Aug 28 22:36:37 WST 2007


varun_shrivastava wrote:
> GtkVBox --> GtkMyDisplayable ---> GtkMyForm
> 
> GtkMyDisplayable has an api gtk_my_displayable_add_command(GtkMyDisplayable
> *displayable, gchar *string)
> 
> so i do following at python prompt
> 
>>>> form = mygtk.MyForm()
>>>> form.displayable_add_command("_____")
> it displays following error
> "form has no attribute displayable_add_command"

Does the .defs file contain a definition for the 
gtk_my_displayable_add_command function?  It may be mapped using the 
name 'add_command' instead of displayable_add_command.

BTW, I wouldn't call this an inheritance problem because the method is 
only defined in a single class and you're apparently using an instance 
of that class.

Cheers,

John


More information about the pygtk mailing list