mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-07 04:20:07 +01:00
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:
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user