I am trying to write a GTK widget in Python that is a subclass of gtk.Bin and am not sure how to go about instantiating it. The first few lines of my class look like:
class Completer(gtk.Bin):
def __init__(self, exts)):
gtk.Container.__init__(self)
child = gtk.VBox(spacing=15)
self.add(child)
I'm not sure how to set the child attribute, hence the code for that. But it hangs up on the line gtk.Container.__init__(self) with the message:
File "C:\Users\462974\Documents\Local Sandbox\tools\python\packages\GUI\tools\SNCompleter.py", line 133, in __init__
gtk.Container.__init__(self)
TypeError: cannot create instance of abstract (non-instantiable) type `GtkBin'
It also happens if I call gtk.Bin.__init__. I'm not sure how to initialize this subclass, but there is presumably a way since GTK does have usable subclasses of gtk.Bin.