can't create wxHtmlWinParser object

Hello,

Some time ago I used to write some wx code in C++, now I'm using python. I
can't create wxHtmlWinParser object in way which works in C++. This is
python code:

   from wxPython.wx import *
   from wxPython.html import *

   [...]

   class Window(wxFrame):

      [...]

      htmlWin = wxHtmlWindow(self, -1)
      htmlParser = wxHtmlWinParser(htmlWin) # line 208

   [...]

Equivalent C++ code works fine, and for this python says:

   File "./my_program.py", line 208, in __init__
       self.htmlParser = wxHtmlWinParser(self.htmlWin)
   File "/usr/lib/python2.2/site-packages/wxPython/html.py", line 265,
   in __init__
       self.this = apply(htmlc.new_wxHtmlWinParser,_args,_kwargs)
       TypeError: Type error in argument 1 of new_wxHtmlWinParser.
       Expected _wxHtmlWindow_p.
             
What's wrong? I just want to change font encoding, face, etc for my htmlWin,
but couldn't find any code sample on the net. Thanks for help.

Martynas Jocius

···

--
There is more vision than meets the eye.
http://mjoc.sig.lt

Martynas Jocius wrote:

      htmlWin = wxHtmlWindow(self, -1)
      htmlParser = wxHtmlWinParser(htmlWin) # line 208

   [...]

Equivalent C++ code works fine, and for this python says:

   File "./my_program.py", line 208, in __init__
       self.htmlParser = wxHtmlWinParser(self.htmlWin)
   File "/usr/lib/python2.2/site-packages/wxPython/html.py", line 265,
   in __init__
       self.this = apply(htmlc.new_wxHtmlWinParser,_args,_kwargs)
       TypeError: Type error in argument 1 of new_wxHtmlWinParser.
       Expected _wxHtmlWindow_p.
             What's wrong?

It's a bug in the wxPYthon wrapper. I'll get it fixed for 2.4.1.

···

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