Hi,
I wrote a parent class like this:
class PluginObject(gobject.GObject):
__gsignals__ = {
"change-ui": (gobject.SIGNAL_RUN_FIRST,
gobject.TYPE_NONE,
(gobject.TYPE_PYOBJECT, gobject.TYPE_STRING,)),
}
def __init__(self):
gobject.GObject.__init__(self)
, and a child class like this:
class PluginComboBox(gtk.ComboBox, PluginObject):
def __init__(self, input_dict):
PluginObject.__init__(self)
gtk.ComboBox.__init__(self)
...
self.connect("changed", self.changed_cb, input_dict)
self.set_active(0)
def changed_cb(self, widget, data = None):
model = self.get_model()
index = self.get_active()
self.emit("change-ui", data.values, data[model[index][0]])
, but I got a
TypeError: <PluginComboBox object at 0x7f02c4c20690 (GtkComboBox at
0x26e8010)>: unknown signal name: change-ui
It seems __gsignals__ isn't inherited, how can I get it work?
Sorry for my english.
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/