[wxPython-users] EVT_PAINT handler raising excption, gets called repeatedly

Robin Dunn robin at alldunn.com
Wed Jul 4 11:10:59 PDT 2007


Charl P. Botha wrote:

> After having added an event.Skip()
> before the Render(), I'm not seeing the repeated callbacks anymore.

Skip() allows the default event handler to still be run after your 
handler returns, so that avoids the Windows thing of resending the event 
if it thinks that it still needs painted.  IOW, it is probably just 
hiding the real problem, not solving it.  If you are creating a 
wx.PaintDC before the exception happens then I can think of two other 
things that could cause this.  1. The window you are passing to 
wx.PaintDC is not the one that the event was sent for.  2. You are 
calling Refresh.  If neither of these are true then you might want to 
try and reproduce this in a small sample app that doesn't use VTK.

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





More information about the wxpython-users mailing list