Set wx.Locale to avoid assertion errors

If customtreectrl.py or hypertreelist.py modules are run the latest
wxPython versions will throw Assertion errors if the locale is not set.

wxAssertionError: C++ assertion "strcmp(setlocale(LC_ALL, NULL), "C")
== 0" failed at ..\..\src\common\intl.cpp(1579) in wxLocale::GetInfo():
You probably called setlocale() directly instead of using wxLocale and
now there is a mismatch between C/C++ and Windows locale.
Things are going to break, please only change locale by creating
wxLocale objects to avoid this!
This commit is contained in:
cbeytas
2018-11-21 14:30:17 -05:00
parent 5f5e1fbd5b
commit f280855a03
2 changed files with 2 additions and 2 deletions

View File

@@ -8753,7 +8753,7 @@ if __name__ == '__main__':
# our normal wxApp-derived class, as usual
app = wx.App(0)
locale = wx.Locale(wx.LANGUAGE_DEFAULT)
frame = MyFrame(None)
app.SetTopWindow(frame)
frame.Show()

View File

@@ -4955,7 +4955,7 @@ if __name__ == '__main__':
# our normal wxApp-derived class, as usual
app = wx.App(0)
locale = wx.Locale(wx.LANGUAGE_DEFAULT)
frame = MyFrame(None)
app.SetTopWindow(frame)
frame.Show()