tis 2003-02-18 klockan 09.42 skrev Roberto Cavada:
> Hi all,
> I am currently trying to port the python wrapper for a gtk widget
> (gtkscintilla2).
Nice, the more bindings, the better :-)
>
> *** SOME CONTEXT:
> Original wrapper works with pygtk1 (say 'W1').
>
> Since the gtk widget is now available for gtk2, I am trying to modify
> W1 in order to make it working with pygtk2 (say 'W2').
>
> I have to say I am not sure about the result, since I am not as much
> familiar with pygtk c-side as I'd like, and in general with gtk. In
> particular in W1 I found many references to functions PyGtk_{New, Get,
> Type}, defined by pygtk.h.
There are unfortunately not lots of documentation.
But if you have experience with the old bindings, you can look at the
code in either way gtk.c (auto-generated) eller gtk.override
> In W2 pygtk.h does no longer export like that functions. Instead,
> pygobject.h exports similar functions, and I tried to guess the
> matching as follows (don't know if this is correct):
>
> #define PyGtk_New pygobject_new
> #define PyGtk_Get pygobject_get
or self->obj
> #define PyGtk_Type PyGPointer_Type
PyGObject_Type for GObject based object, or even better
PyGtkWidget_Type (PyGtkContainer_Type etc)
> *** THE PROBLEM:
> W2 initialization code simply calls init_pygtk().
> After initialization, every time W2's code calls PyGtk_New
> (=pygobject_new) a segfault occurs.
Do you have a traceback?
Do you have the code somewhere, so I can help you debug what's wrong?
--
Johan Dahlin <[EMAIL PROTECTED]>
Async Open Source
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/