Problems with Pinyin Simplified Chinese text input
Problems with Pinyin Simplified Chinese text input
- Subject: Problems with Pinyin Simplified Chinese text input
- From: Gideon King <email@hidden>
- Date: Mon, 7 Jun 2010 10:33:30 +1000
Hi, I have a "canvas" view which has a whole lot of text views as subviews. When a person types a letter while the canvas is the first responder, I want to change the first responder to the appropriate text view and replace anything in that text view with the letter typed.
In my canvas view, I implement the NSTextInputClient, and in my -insertText:replacementRange: method, I find the appropriate text view, select all the text, make it selectable and editable, and make it the first responder, then use -insetText: on the text view to put the text there. This works fine for English, and for composed characters like U with an umlaut (Option U, U), and for other input methods e.g. Hirgana, but I am having two problems with the Pinyin simplified input method:
1. Sometimes, the text view has just the first letter showing and the character selection panel is displayed at the bottom left of my main screen. It still works, but just isn't in the right place.
2. Sometimes, the first character typed is repeated twice in the text field, and the character selection panel is displayed in the right place.
I'd really appreciate an suggestions as to how to resolve this issue.
The deployment of this application is 10.5/10.6.
Thanks.
Gideon
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden