I'm testing the attached application, py2exe'd and sent to a client. He gets a popup window with the title "Arabic nights Error" and content "Cannot set locale to language Arabic".
I get the following logs *before* the popup happens:
DEBUG:2007-10-09 11:09:19,516:OnInit at main.py(30): Forcing setting of arabic...
DEBUG:2007-10-09 11:09:19,516:OnInit at main.py(33): Creating main window...
DEBUG:2007-10-09 11:09:19,516:OnInit at main.py(35): Main frame created, setting top window
DEBUG:2007-10-09 11:09:19,532:OnInit at main.py(37): Showing frame...
DEBUG:2007-10-09 11:09:19,532:OnInit at main.py(39): Done, returning True in OnInit
Which basically means... wxWidgets is showing that popup somewhere, sometime in the main application event loop and I'm unable to control it, hide it, or customise the message.
I'm running 2.8.0 under WindowsXP and obviously the solution is to install locale support for Arabic in the OS, but is there any way to control this popup, reduce it to a log or something like that? I don't like it appearing out of nowhere in my program when I'm switching locales or some user is just looking at the different available languages and some of them popup the ugly message.
I'm running 2.8.0 under WindowsXP and obviously the solution is to install locale support for Arabic in the OS, but is there any way to control this popup, reduce it to a log or something like that?
Ok, so it is the C++ version calling wxLogWarning. I have been able to supress the popup with wx.LogGui.EnableLogging(False).
I'm running 2.8.0 under WindowsXP and obviously the solution is to install locale support for Arabic in the OS, but is there any way to control this popup, reduce it to a log or something like that?
Ok, so it is the C++ version calling wxLogWarning. I have been able to supress the popup with wx.LogGui.EnableLogging(False).
Look in the demo's Main.py. It shows both how to create your own log target class and how to use SetActiveTarget to direct the log messages there. It should be pretty simple to create a log target that sends the messages to Python's current logging target.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!