memory dc problem in 2.7pre
Michele Petrazzo
michele.petrazzo at unipex.it
Fri Jul 21 08:42:51 PDT 2006
Hi,
I'm trying the last build (on linux) and I see that there is a problem
on wxMemory dc:
import wx
class MyFrame(wx.Frame):
def __init__(self,parent, *args, **kw):
super(MyFrame, self).__init__(parent, *args, **kw)
wx.FutureCall(2000, self._createMD)
def _createMD(self):
print "OK"
dc = wx.MemoryDC()
dc.BeginDrawing()
dc.SetUserScale(1.0,1.0)
dc.SetBackground(wx.WHITE_BRUSH)
if __name__ == '__main__':
app = wx.PySimpleApp()
f = MyFrame(None)
f.Show()
app.MainLoop()
File "MyFrame.py", line 15, in _createMD
dc.SetBackground(wx.WHITE_BRUSH)
File
"/usr/lib/python2.4/site-packages/wx-2.7.0-gtk2-unicode/wx/_gdi.py",
line 3125, in SetBackground
return _gdi_.DC_SetBackground(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "Ok()" failed at
../src/gtk/dcclient.cpp(2041) in SetBackground(): invalid window dc
Michele
More information about the wxpython-dev
mailing list