"global name 'NormalFont' is not defined" error in ogl.ShapeRegion
Matthieu Brucher
matthieu.brucher at gmail.com
Wed May 16 03:33:39 PDT 2007
On 2.8 and Windows, the error is this one :
RectangleShape.__init__(self, 100.0, 100.0)
File "D:\Python25\lib\site-packages\wx-
2.8-msw-unicode\wx\lib\ogl\_basic.py", line 2314, in __init__
Shape.__init__(self)
File "D:\Python25\lib\site-packages\wx-
2.8-msw-unicode\wx\lib\ogl\_basic.py", line 232, in __init__
self._pen =3D BlackForegroundPen
NameError: global name 'BlackForegroundPen' is not defined
What am I missing ??
Matthieu
2007/5/16, Matthieu Brucher <matthieu.brucher at gmail.com>:
>
> Hi,
>
> I'm trying to put a simple RectangleShape in a canvas, but the creation of
> a RectangleShape crashes on Linux (wxPython 2.6 :():
>
> >>> import wx
> >>> import wx.lib.ogl
> >>> app =3D wx.App()
> >>> shape =3D ogl.RectangleShape(100, 100)
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/lib/ogl/_=
basic.py",
> line 2320, in __init__
> Shape.__init__(self)
> File "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/lib/ogl/_=
basic.py",
> line 277, in __init__
> region =3D ShapeRegion()
> File "/usr/lib/python2.4/site-packages/wx- 2.6-gtk2-unicode/wx/lib/ogl/=
_basic.py",
> line 2982, in __init__
> self._font =3D NormalFont
> NameError: global name 'NormalFont' is not defined
>
> Didn't find a reference on the net on this error, so I suppose I'm doing
> something wrong here...
> Any ideas ?
>
> Matthieu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200705=
16/d34fa5c5/attachment.htm
More information about the wxpython-users
mailing list