Hi,
This issue is specific to Mac Single line wxTextCtrl(wxTE_MULTILINE style is not defined for control) Steps to reproduce:
1. Enter a single Hiragana Japanese character in a wxTextCtrl
2. Press enter
Result: character is not confirmed
Expected: Character should be confirmed
The issue does not happen when multiple characters are entered. I debugged wxWidgets code and found following difference in single character and multiple character handling:
bool wxWidgetCocoaImpl::DoHandleCharEvent(NSEvent *event, NSString *text)
{
...
...
// if we have exactly one character resulting from the event, then
// set the corresponding modifiers and raw data from the nsevent
// otherwise leave these at defaults, as they probably would be incorrect
// anyway (IME input)
if ( event != nil && length == 1)
{
SetupKeyEvent(wxevent,event,text);
}
else
{
...
..
result = peer->OSXHandleKeyEvent(wxevent) || result;
}
}
return result;
}
Further in class wxTextCtrl, EVT_CHAR is handled. In this function, there is a code to prevent the processing of Enter key when the control is not Multiline.
void wxTextCtrl::OnChar(wxKeyEvent& event)
These two chunks of code prevent the processing of enter key in case of single kanji character from IME.
This is a wxWidgets defect. Single Kanji characters can be confirmed in native Mac applications. Even wxTextCtrl on Windows OS confirms single Kanji characters. Please fix this defect on Mac.
Thank you
Alka Dua
Mac, wxWidgets C++: Can not confirm single Kanji Character in single line wxTextCtrl.
Re: Mac, wxWidgets C++: Can not confirm single Kanji Character in single line wxTextCtrl.
I can't test this as i don't work under OSX, but it indeed sounds like bug.
Please open a ticket at http://trac.wxwidgets.org/
Thanks.
Please open a ticket at http://trac.wxwidgets.org/
Thanks.
Use the source, Luke!
Re: Mac, wxWidgets C++: Can not confirm single Kanji Character in single line wxTextCtrl.
Hi,
First of all - are you trying to enter Kanji or Hiragana character? Google says it is 2 different alphabets...
Second - are you able to reproduce it in a text sample (from wxWidgets distribution)?
Third - what OSX version are you testing on? Is it in VM or a real hardware?
Fourth - I presume you have installed everything required as you wrote you are able to do it in the native OSX application?
Fifth - Are you testing on the Japanese version of OSX or an English/US one?
When you create a ticket, as suggested by doublemax - pleasze put an answers to all those questions.
Also, please mention the wxWidgets version and how did you build it - namely what was the configure line you used?
Thank you.
First of all - are you trying to enter Kanji or Hiragana character? Google says it is 2 different alphabets...
Second - are you able to reproduce it in a text sample (from wxWidgets distribution)?
Third - what OSX version are you testing on? Is it in VM or a real hardware?
Fourth - I presume you have installed everything required as you wrote you are able to do it in the native OSX application?
Fifth - Are you testing on the Japanese version of OSX or an English/US one?
When you create a ticket, as suggested by doublemax - pleasze put an answers to all those questions.
Also, please mention the wxWidgets version and how did you build it - namely what was the configure line you used?
Thank you.