#141 wxHTMLWindow error, and solution

closed-fixed
Riaan Booysen
None
5
2003-09-15
2003-09-04
Peter Herndon
No

I'm cross-posting this to the forum as well.

I was building a GUI in Boa 0.2.6, wxPython 2.4.1.2,
Python 2.3, WinNT4.0 and wanted to use a
wxHTMLWindow control. I attempted to add it to my
frame, and received the following error:

12:39:51: Illegal expression:
wxHW_SCROLLBAR_AUTO
12:39:51: Traceback (most recent call
last):
12:39:51:
File "C:\cygwin\home\mskteam\boa\Views\Designer.py",
line 1383, in OnControlSelect
12:39:51: if dsgn.selectControlByPos(ctrl, pos,
event.ShiftDown()):
12:39:51:
File "C:\cygwin\home\mskteam\boa\Views\Designer.py",
line 794, in selectControlByPos
12:39:51: self.compPal.selection[2],
pos)
12:39:51:
File "C:\cygwin\home\mskteam\boa\Views\Designer.py",
line 486, in newControl
12:39:51: companion.designTimeControl(position,
size), parentName)
12:39:51:
File "C:\cygwin\home\mskteam\boa\Companions\BaseCom
panions.py", line 589, in designTimeControl
12:39:51: self.designTimeDefaults(position,
size))
12:39:51:
File "C:\cygwin\home\mskteam\boa\Companions\BaseCom
panions.py", line 605, in designTimeDefaults
12:39:51: dts[param] = self.eval(dts
[param])
12:39:51:
File "C:\cygwin\home\mskteam\boa\Companions\BaseCom
panions.py", line 431, in eval
12:39:52: return PaletteMapping.evalCtrl(expr,
self.designer.model.specialAttrs)
12:39:52:
File "C:\cygwin\home\mskteam\boa\PaletteMapping.py",
line 147, in evalCtrl
12:39:52: return eval(expr, globals(),
localsDct)
12:39:52: File "<string>", line 0,
in ?
12:39:52: NameError:
name 'wxHW_SCROLLBAR_AUTO' is not defined

After some poking, I found that the file
Boa/Companions/BasicCompanion.py has an incorrect
import statement at line 16, which says:

from wxPython.html import wxHTMLWindow

when it should say:

from wxPython.html import *

When I make the change, everything works without error.

Discussion

  • Riaan Booysen
    Riaan Booysen
    2003-09-15

    Logged In: YES
    user_id=438

    Ah thanks, fixed now.

    Change will be available in 0.2.7 CVS.

    Riaan.

     
  • Riaan Booysen
    Riaan Booysen
    2003-09-15

    • assigned_to: nobody --> riaan
    • status: open --> closed-fixed