> Hi, I have a view which implements the NSTextInputClient protocol, and my 
> implementation of 
> 
> - (void)setMarkedText:(id)aString selectedRange:(NSRange)selectedRange 
> replacementRange:(NSRange)replacementRange
> 
> creates an NSTextView, adds it as a subview, makes it first responder, 
> selects all the text, deletes it, and then tries to use either the same 
> setMarkedText... call on the subview's input context or 
> setMarkedText:selectedRange: on the view to try to set the marked text. 
> 
> It looks as if it works, but when I press the next keystroke, it doesn't 
> insert the composed character. E.g. I want to add an e acute, and I press 
> option-e and it shows the acute, then I press e and it just replaces the 
> acute with the e instead of composing an e acute.
> 
> Any suggestions of how to get this working properly?

This discussion belongs on cocoa-dev; coretext-dev is a discussion list for the 
CoreText API.

That being said: your input client’s NSTextView subview has its own editing 
session, so the input method won’t try to compose text (that is, 
setMarkedRange: is an appearance attribute only and doesn’t affect how the 
system interprets user input). Why are you inserting a subview like this? If 
it’s just to get the yellow-highlight/thick-underline behavior, you should 
implement that yourself in your input client.

-Ben_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to