Evgeny Chukreev wrote: >On Mon, 09 Sep 2002 17:27:19 +0800, James Henstridge <[EMAIL PROTECTED]> wrote: > >JH>>> Try changing your code to look like the following: >JH>>> class A(gtk.Window): >JH>>> __gsignals__ = { 'no_undo': (gobject.SIGNAL_RUN_FIRST, None, ()) } >JH>>> def __init__(self): >JH>>> self.__gobject_init__() >JH>>> def do_no_undo(self): >JH>>> print "no_undo class closure called!" >JH>>> gobject.type_register(A) >JH>>> That should do what you want. > > >>>Yes. But look: >>> >>> > > > >>>--------------- >>>/var/tmp% python test1.py >>>no_undo closure class called >>> >>> > > > >>>(test1.py:1775): GLib-GObject-WARNING **: instance of invalid non-instantiatable >type `(null)' >>> >>> > > > >>>(test1.py:1775): GLib-GObject-CRITICAL **: file gsignal.c: line 1732 >(g_signal_handlers_destroy): assertion `G_TYPE_CHECK_INSTANCE (instance)' failed >>>zsh: segmentation fault python test1.py >>>--------------- >>> >>> > > > >>>Python 2.2.1 (#1, May 3 2002, 23:19:03) >>>[GCC 2.95.4 20011002 (Debian prerelease)] on linux2 >>> >>> > > > >>>PyGTK 1.99.12 >>>Gtk 2.0.5 >>> >>> >JH> Upgrade to 1.99.13 >Ok. Even with 1.99.13 (on linux) I still have this error. > > > Could you file a bug on this? I have an idea of what the problem is, but not the specifics of how to solve it yet. It is due to the fact that if you run "win = g_object_new(GTK_TYPE_WINDOW, NULL);", you don not own a reference to "win". It is currently special cased in the constructors for gtk.Window, etc, but not handled by __gobject_init__().
James. -- Email: [EMAIL PROTECTED] | Linux.conf.au http://linux.conf.au/ WWW: http://www.daa.com.au/~james/ | Jan 22-25 Perth, Western Australia. _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/