The basics are already working in wxWidgets, but I'm getting problems to
make a wxPython module. I'm using swig-1.3.24 with Robin patch
I'm getting this error:
Traceback (most recent call last):
File "pypdf.py", line 65, in ?
frame = MyFrame()
File "pypdf.py", line 60, in __init__
pdf = PDFWindow(self, -1)
File
"/usr/lib/python2.4/site-packages/wx-2.5.5-gtk2-unicode/wx/pdfwin.py",
line 70, in __init__
self._setOORInfo(self)
File
"/usr/lib/python2.4/site-packages/wx-2.5.5-gtk2-unicode/wx/_core.py",
line 2977, in _setOORInfo
return _core_.EvtHandler__setOORInfo(*args, **kwargs)
TypeError: argument number 1: a 'wxEvtHandler *' is expected,
'PySwigObject(_p_wxPDFWindow)' is received
PS: If there is any interest I can send what I've done until now.
Traceback (most recent call last):
File "pypdf.py", line 66, in ?
frame = MyFrame()
File "pypdf.py", line 63, in __init__
panel = TestPanel(self)
File "pypdf.py", line 14, in __init__
self.pdf = PDFWindow(self, -1, style=wx.SUNKEN_BORDER)
File
"/usr/lib/python2.4/site-packages/wx-2.5.5-gtk2-unicode/wx/pdfwin.py",
line 65, in __init__
newobj = _pdfwin.new_PDFWindow(*args, **kwargs)
TypeError: argument number 1: a 'wxWindow *' is expected,
'PySwigObject(_p_wxPanel)' is received
Qua, 2005-04-13 às 16:22 +0100, Ricardo Pedroso escreveu:
The basics are already working in wxWidgets, but I'm getting problems to
make a wxPython module. I'm using swig-1.3.24 with Robin patch
I'm getting this error:
Traceback (most recent call last):
File "pypdf.py", line 65, in ?
frame = MyFrame()
File "pypdf.py", line 60, in __init__
pdf = PDFWindow(self, -1)
File
"/usr/lib/python2.4/site-packages/wx-2.5.5-gtk2-unicode/wx/pdfwin.py",
line 70, in __init__
self._setOORInfo(self)
File
"/usr/lib/python2.4/site-packages/wx-2.5.5-gtk2-unicode/wx/_core.py",
line 2977, in _setOORInfo
return _core_.EvtHandler__setOORInfo(*args, **kwargs)
TypeError: argument number 1: a 'wxEvtHandler *' is expected,
'PySwigObject(_p_wxPDFWindow)' is received
PS: If there is any interest I can send what I've done until now.
Traceback (most recent call last):
File "pypdf.py", line 66, in ?
frame = MyFrame()
File "pypdf.py", line 63, in __init__
panel = TestPanel(self)
File "pypdf.py", line 14, in __init__
self.pdf = PDFWindow(self, -1, style=wx.SUNKEN_BORDER)
File
"/usr/lib/python2.4/site-packages/wx-2.5.5-gtk2-unicode/wx/pdfwin.py",
line 65, in __init__
newobj = _pdfwin.new_PDFWindow(*args, **kwargs)
TypeError: argument number 1: a 'wxWindow *' is expected,
'PySwigObject(_p_wxPanel)' is received
Hmmm... I havn't seen it use this 'PySwigObject(_p_wxPanel)' syntax before...
I wonder if you are using the same swig and compile options as wxPython. Does your setup.py use wxPython's wx.build.config module to get those settings and such? Building inside the wxPython source tree and using wxPython's setup.py is another way to do it.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Hmmm... I havn't seen it use this 'PySwigObject(_p_wxPanel)' syntax before...
I wonder if you are using the same swig and compile options as wxPython. Does your setup.py use wxPython's wx.build.config module to get those settings and such? Building inside the wxPython source tree and using wxPython's setup.py is another way to do it.
Just in case it might help, here's a link to wxMozilla's setup.py script which does use wx.build.config:
The first 10 lines import wx.build.config and setup MULTIVERSION support, and the last 15 lines or so actually setup the extension building code.