evt.GetUnicodeKey returns int instead of string
Werner <[email protected]>
| Newsgroups | gmane.comp.python.wxpython.devel |
|---|---|
| Message-ID | <[email protected]> |
There is an issue in ObjectListView where a user sees this exception: File "D:\devOther\samplesTest\olvQuestions\user32typeerror.py", line 111, in <module> main() File "D:\devOther\samplesTest\olvQuestions\user32typeerror.py", line 108, in main app.MainLoop() File "c:\Python27\Lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 8010, in MainLoop wx.PyApp.MainLoop(self) File "c:\Python27\Lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 7306, in MainLoop return _core_.PyApp_MainLoop(*args, **kwargs) File "c:\Python27\Lib\site-packages\ObjectListView\ObjectListView.py", line 1410, in _HandleChar if self._HandleTypingEvent(evt): File "c:\Python27\Lib\site-packages\ObjectListView\ObjectListView.py", line 1457, in _HandleTypingEvent if uniChar not in string.printable: TypeError: 'in <string>' requires string as left operand, not int When I set a breakpoint and then check the value I see this (I pressed "3"). chr(evt.GetKeyCode()) '3' evt.GetUnicodeKey() 51 Phoenix documentation states that GetUnicodeKey should return a string. I tested with 2.8.12 Unicode, 3.0.2 and Phoenix and see the same result. Werner -- You received this message because you are subscribed to the Google Groups "wxPython-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.