Re: evt.GetUnicodeKey returns int instead of string
Werner <[email protected]>
| Newsgroups | gmane.comp.python.wxpython.devel |
|---|---|
| Message-ID | <[email protected]> |
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? 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.