Problem with wxPython extension

Thanks Nitro, you're been a great help so far. Unfortunately you're
suggestion didn't work. I can't believe that creating an extension would be
so difficult, or, maybe I am just not getting the gist of it.

···

-----Original Message-----
From: Nitro [mailto:nitro@dr-code.org]
Sent: Thursday, September 29, 2005 3:32 PM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] Problem with wxPython extension

Traceback (most recent call last):
  File "C:\projects\mvp\maestro_v3\src\base\python\msw\t.py", line 16,
in ?
    frame = MainWindow(None,-1,'Small editor')
  File "C:\projects\mvp\maestro_v3\src\base\python\msw\t.py", line 9, in
__init__
    self.control = m2u_base.mvpBaseCanvas(self,1)
  File "C:\projects\mvp\maestro_v3\src\base\python\msw\m2u_base.py", line
65, in __init__
    self._setOORInfo(self)

try changing the last line to
self._setOORInfo(wx.EvtHandlerPtr(self))

It seems swig doesn't recognize self as a valid wxEvtHandler object. If
the above fix works (I am really not sure) then you could probably fiddle
around with the swig implicit.i library module to get _setOORInfo
recognize the param correctly.
This is just a guess here though, don't be surprised if the new line above
doesn't work.
You somehow need to convert self (which is a mvpBaseCanvas object directly
derived from wx.ScrolledWindow and thus is a wx.EvtHandler) into a
wx.EvtHandler. For some reason swig does not recognize that.

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

I didn't follow this thread so my question may not be pertinent, but
here they are.

Are you passing the -DSWIG_TYPE_TABLE=_wxPython_table switch to the
compiler when compiling the source code generated by swig?

Have you build swig with the Robin Dunn patches?

Ricardo

···

On Thu, 2005-09-29 at 15:43 -0400, Mike Heanssgen wrote:

Thanks Nitro, you're been a great help so far. Unfortunately you're
suggestion didn't work. I can't believe that creating an extension would be
so difficult, or, maybe I am just not getting the gist of it.