Updating wxMozilla MSW to 2.5.4

Hi Robin,

I'm in the process of upgrading my Windows box to 2.5.4.1, but I've run into a couple snags. ;-/

First, I found that I needed to copy the "<wxWidgets>/wxPython/src/*_ex.py" files from my wxWidgets source folder into the wxPython 2.5.4.1-devel package in order to re-SWIG wxMozilla. After doing so, it seemed to build and install fine.

However, when I then try and run an app using wxMozilla, I get the following traceback:

Traceback (most recent call last):
   File "C:\oss\eclass_builder\editor.py", line 4185, in ?
     app = MyApp(0)
   File "C:\Python23\Lib\site-packages\wx-2.5.4-msw-ansi\wx\_core.py", line 5577,
  in __init__
     self._BootstrapApp()
   File "C:\Python23\Lib\site-packages\wx-2.5.4-msw-ansi\wx\_core.py", line 5229,
  in _BootstrapApp
     return _core_.PyApp__BootstrapApp(*args, **kwargs)
   File "C:\oss\eclass_builder\editor.py", line 4146, in OnInit
     self.frame = MainFrame2(None, -1, "EClass.Builder")
   File "C:\oss\eclass_builder\editor.py", line 497, in __init__
     self.mozilla = wxMozillaBrowser(self.previewpanel, -1, style = wxSIMPLE_BORD
ER | wxCLIP_CHILDREN)
   File "C:\Python23\Lib\site-packages\wx-2.5.4-msw-ansi\wx\mozilla.py", line 19,
  in __init__
     newobj = _mozilla.new_MozillaBrowser(*args, **kwargs)
TypeError: Expected a pointer

I noticed in the CHANGES doc that you mention something about a change to the pointers returned by the wrapper, and I wondered if there's some change I need to make to my .i file to update. I couldn't see anything obvious in the wxPython .i files though. ;-/ Any ideas?

Also, do I need to be including my_typemaps.i and typemaps.i any longer? I don't see it in the wxPython .i files, and I get the same results whether or not I include it, so I was wondering if that's something I can take out.

Thanks,

Kevin

Kevin Ollivier wrote:

Hi Robin,

I'm in the process of upgrading my Windows box to 2.5.4.1, but I've run into a couple snags. ;-/

First, I found that I needed to copy the "<wxWidgets>/wxPython/src/*_ex.py" files from my wxWidgets source folder into the wxPython 2.5.4.1-devel package in order to re-SWIG wxMozilla. After doing so, it seemed to build and install fine.

Thanks. I've added a *.py copy command to the script that makes the win32-dev tarball.

However, when I then try and run an app using wxMozilla, I get the following traceback:

Traceback (most recent call last):
  File "C:\oss\eclass_builder\editor.py", line 4185, in ?
    app = MyApp(0)
  File "C:\Python23\Lib\site-packages\wx-2.5.4-msw-ansi\wx\_core.py", line 5577,
in __init__
    self._BootstrapApp()
  File "C:\Python23\Lib\site-packages\wx-2.5.4-msw-ansi\wx\_core.py", line 5229,
in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "C:\oss\eclass_builder\editor.py", line 4146, in OnInit
    self.frame = MainFrame2(None, -1, "EClass.Builder")
  File "C:\oss\eclass_builder\editor.py", line 497, in __init__
    self.mozilla = wxMozillaBrowser(self.previewpanel, -1, style = wxSIMPLE_BORD
ER | wxCLIP_CHILDREN)
  File "C:\Python23\Lib\site-packages\wx-2.5.4-msw-ansi\wx\mozilla.py", line 19,
in __init__
    newobj = _mozilla.new_MozillaBrowser(*args, **kwargs)
TypeError: Expected a pointer

I noticed in the CHANGES doc that you mention something about a change to the pointers returned by the wrapper, and I wondered if there's some change I need to make to my .i file to update. I couldn't see anything obvious in the wxPython .i files though. ;-/ Any ideas?

Did you also update your SWIG to 1.3.24 (plus my patch)?

Also, do I need to be including my_typemaps.i and typemaps.i any longer? I don't see it in the wxPython .i files, and I get the same results whether or not I include it, so I was wondering if that's something I can take out.

my_typemaps.i is still there, but you'll automatically get it when you do %import core.i (or whichever of the core modules that you %import.)

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Hi Robin,

[snip]

Did you also update your SWIG to 1.3.24 (plus my patch)?

[Note to self... Check the darn version first!!] Sorry, I'm really not sure how, but it appears I've been getting by with a version of SWIG 1.3.22. ;-/ This is driving me nuts because I remember (or at least seem to) updating SWIG on Windows for the 2.5.3 releases...

Anyways, thanks for the sanity check. :wink: Off to get my setup right now...

Kevin

···

On Mar 22, 2005, at 4:27 PM, Robin Dunn wrote:

Hi Robin,

Hi Robin,

[snip]

Did you also update your SWIG to 1.3.24 (plus my patch)?

[Note to self... Check the darn version first!!] Sorry, I'm really not sure how, but it appears I've been getting by with a version of SWIG 1.3.22. ;-/ This is driving me nuts because I remember (or at least seem to) updating SWIG on Windows for the 2.5.3 releases...

Anyways, thanks for the sanity check. :wink: Off to get my setup right now...

OK, I updated to patched SWIG 1.3.24, confirmed the version ;-), checked one of the source files to confirm the patch was applied (however, I just copied my Mac sources over where I've been using it for a while) and did a clean rebuild of wxMozilla's setup.py. Unfortunately, I'm still getting that pointer error. ;-/

Any ideas? I'll keep looking into this.

Thanks,

Kevin

···

On Mar 22, 2005, at 4:57 PM, Kevin Ollivier wrote:

On Mar 22, 2005, at 4:27 PM, Robin Dunn wrote:

Kevin

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

Kevin Ollivier wrote:

Hi Robin,

Hi Robin,

[snip]

Did you also update your SWIG to 1.3.24 (plus my patch)?

[Note to self... Check the darn version first!!] Sorry, I'm really not sure how, but it appears I've been getting by with a version of SWIG 1.3.22. ;-/ This is driving me nuts because I remember (or at least seem to) updating SWIG on Windows for the 2.5.3 releases...

Anyways, thanks for the sanity check. :wink: Off to get my setup right now...

OK, I updated to patched SWIG 1.3.24, confirmed the version ;-), checked one of the source files to confirm the patch was applied (however, I just copied my Mac sources over where I've been using it for a while) and did a clean rebuild of wxMozilla's setup.py. Unfortunately, I'm still getting that pointer error. ;-/

Any ideas? I'll keep looking into this.

Are you sure that the mozilla.i file got reSWIGged? I thought that the unhelpful "Expected a pointer" message was totally gone in 1.3.24... Look at the begining of the mozilla_wrap.cpp file to see what version it was generated with.

Try putting a breakpoint in _wrap_new_MozillaBrowser and see where it is coming from. If you still have a SWIG mismatch then you could get that error if it doesn't know how to figure out what the type of the parent window is. (SWIG is sharing the type tables across modules differently now, so the old SWIGged code definitly won't be able to figure it out.)

The other thing to double check is that your compiles are using the -DSWIG_TYPE_TABLE=wxPython_type_table compile option (it's set in config.py so they should.) This is the name of the variable shared by all modules containing all of the wxPython type info structures.

···

On Mar 22, 2005, at 4:57 PM, Kevin Ollivier wrote:

On Mar 22, 2005, at 4:27 PM, Robin Dunn wrote:

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Hi Robin,

[snip]

Are you sure that the mozilla.i file got reSWIGged? I thought that the unhelpful "Expected a pointer" message was totally gone in 1.3.24... Look at the begining of the mozilla_wrap.cpp file to see what version it was generated with.

Irk... Sorry, that was it. Working fine now. :wink:

Thanks,

Kevin

···

On Mar 22, 2005, at 8:22 PM, Robin Dunn wrote:

Try putting a breakpoint in _wrap_new_MozillaBrowser and see where it is coming from. If you still have a SWIG mismatch then you could get that error if it doesn't know how to figure out what the type of the parent window is. (SWIG is sharing the type tables across modules differently now, so the old SWIGged code definitly won't be able to figure it out.)

The other thing to double check is that your compiles are using the -DSWIG_TYPE_TABLE=wxPython_type_table compile option (it's set in config.py so they should.) This is the name of the variable shared by all modules containing all of the wxPython type info structures.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

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