Re: evt.GetUnicodeKey returns int instead of string
Werner <[email protected]>
| Newsgroups | gmane.comp.python.wxpython.devel |
|---|---|
| Message-ID | <[email protected]> |
On 4/9/2015 10:14, Werner wrote: > On 4/8/2015 18:01, Robin Dunn wrote: > ... >> Actually, the documentation is incorrect. The C++ GetUnicodeKey >> returns a wxChar value, which is a typedef for an integer type of >> whatever size is appropriate for single unicode values on the platform. >> >> The mistake in the documentation is probably because the sphinx >> generator is assuming that wxChar is the same as wxChar*, which is a >> pointer to a buffer of wxChar values, which would usually be thought >> of as a string-like thing. So the fix would be to track down where >> that is happening and change it to treat non-pointer wxChars as int. >> > In etg.tweacker_tools.guessTypeStr I see on line 1175 wxString, > wxChar, char* and char *, so if I understand you correctly then wxChar > should be removed here and added to etg.tweacker_tools.guessTypeInt > line 1157. > > Then we also have the documentation text (to be changed in wxWidgets): > "Returns the Unicode character corresponding to this key event." > > which should be changed to: > "Returns the key code of the key that generated this event." > > Should I do a PR for the first thing and report the text change to > wx-dev? > Hhm, has something changed? I now get a this: evt.GetUnicodeKey() u'\xf6' wx.VERSION_STRING '3.0.3.dev1784+18750f4' 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.