ons 2004-09-01 klockan 15.27 skrev Skip Montanaro:
> I subclassed gtk.Table, then started trying to integrate it with Glade-2.  I
> realized I needed to set __gproperties__ to add a property to the class, so
> I added that:

In 2.3.9x I added a fourth argument to gtk.glade.XML, it's a dictionary
used to do lookups, so if you send in {'GtkTable': 'MyTable' } and have
registered a GType with the same name it should instanstiate that
object.

However, as you have noticed the python constructor, __init__ is not
called. That's because when libglade creates widgets it uses
g_object_new (which is wrapped as gobject.new in python) which just uses
a GObject constructor. I don't think, at this point, that its possible
to put any python code in there. I'm afraid you have to do something
else, perhaps __new__ works?


Johan
-- 
Johan Dahlin <[EMAIL PROTECTED]>

_______________________________________________
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