[pygtk] Subclassing pangocairo.CairoContext
Phil Fazio
phil at philfazio.com
Sun Sep 14 09:11:05 WST 2008
Hello list:
I have been writing an application where I would like to subclass
pangocairo.CairoContext, and add a few additional functions. However,
when I attempt to run this code:
class MyContext(pangocairo.CairoContext):
I get the error message:
TypeError: Error when calling the metaclass bases
type 'pangocairo.CairoContext' is not an acceptable base type
Being relatively new to object-oriented programming, I am wondering if I
am doing something incorrect, but changing pangocairo.CairoContext to
cairo.Context appears to eliminate the error message.
Thanks for any help! :-)
Phil
More information about the pygtk
mailing list