Hi all,

Johan Dahlin wrote:
tis 2003-02-18 klockan 09.42 skrev Roberto Cavada:

I am currently trying to port the python wrapper for a gtk widget (gtkscintilla2).
<CUT>
*** THE PROBLEM:
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?

The segfault - as everyone could guess - was due to the only partial initialization of pygtk: module pygobject was not initialized,
since a init_pygobject() call was missing.

After that, I obtained several other problems, so in second stage I tried to address the problem with a different (and more structured) approach.

This means essentially that I dropped the old pygtk wrapper for scintilla, and I used codegen to generate a new one, starting from GtkScintilla2.

The result if you can help me can be found at URL:
<http://sra.itc.it/people/cavada/dload/pygtkscintilla-1.99.0-broken.tar.bz2>

As you can guess from the filename, it does not work any well, but I think I am closed to have a first working version of the wrapper...
If only I were able to fix some problem!

The problem is that when I try to instantiate a Scintilla object, I obtain what follows (if you try, make sure you have "./" in your LD_LIBRARY_PATH):

>>> import scintilla
Initializing scintilla module
Registered class GtkScintilla
>>>
>>> dir(scintilla)
['Scintilla', '__doc__', '__file__', '__name__']
>>> scintilla.Scintilla
<type 'scintilla.Scintilla'>
>>> dir(scintilla.Scintilla)
['__class__', '__delattr__', '__doc__', '__getattribute__', '__gtype__', '__hash__', '__init__', '__new__', '__reduce__', '__repr__', '__setattr__', '__str__', 'add_ref_document', 'add_text', 'append_text', 'autoc_active', 'autoc_cancel',

<CUT>

>>> scintilla.Scintilla()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: cannot create 'scintilla.Scintilla' instances
>>>

I cannot figure out what's happening here. Maybe I set wrong names insede scintilla.defs and generated code (see scintilla.c), that I partially modified by hand. Don't know.

Some suggestions?
Thank you,
roberto

--
------------------------------------------------------
Roberto Cavada
ITC-irst Institute for Scientific and Technological Research
Automated Reasoning Systems - Formal Methods Group
Via Sommarive, 18 - 38050 Povo (TN) - Italy
Tel: +39 0461 314 321 Fax: +39 0461 302 040
[EMAIL PROTECTED] http://sra.itc.it/people/cavada/
------------------------------------------------------

_______________________________________________
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