wxPython program failing after upgrade

Vadim Zeitlin zeitlin at parthe.lpthe.jussieu.fr
Fri Nov 15 07:22:01 EST 2002


On Wed, 13 Nov 2002 19:26:49 -0500, Blake Garretson <blakeg at metalink.net> wrote:
> I upgraded to wxPython 2.3.3.1 using the precompiled win32 binary, and now
> my wx program won't work.  (I previously used 2.3.2.1)  I'm using a DC
> client to draw some graphics, and it fails when it goes to refresh the
> screen.  Here's the error that shows up in a popup dialog:
> 
> """
> c:\projects\wx\src\msw\dcclient.cpp(216): assert "wxFalse" failed: wxPaintDC
> may be created only in EVT_PAINT handler!
> Do you want to stop the program?
> """

 The assert tries to tell you that there is an error in your program: it is
using wxPaintDC outside of EVT_PAINT handler which is forbidden. Although it
might work in your case on your platform, there is no warranty that it works
on all of them.

 Simply use wxClientDC instead of wxPaintDC outside of EVT_PAINT.

 Regards,
VZ
--
GCS/GM d? H+ s++:-- p2 au--- a- w+ v C+++ UBLS+++ P- L++ N++ E--- W++++ M? V--
-po+ R++ G`` !tv b+++ D--- e++++ u++ h--- f+ r++ n- y?



More information about the Python-list mailing list