[wxPython-users] Re: "global name 'NormalFont' is not defined" error in ogl.ShapeRegion

Pierre Hjälm pierre.hjalm at dis.uu.se
Wed May 16 04:38:08 PDT 2007


"Matthieu Brucher" <matthieu.brucher at gmail.com> writes:

 > 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 = BlackForegroundPen
 > NameError: global name 'BlackForegroundPen' is not defined
 > 
 > What am I missing ??
 > 

You have to call ogl.OGLInitialize() first.

-- 
  Pierre Hjälm




More information about the wxpython-users mailing list