Hi all,

I have seen this issue come up a lot, but there isn't much information on
how to receive unicode input in a NSView.

(I know we are supposed to just type in a NSTextField but that is impossible
in our situation where the app must run stand-alone and as a browser
plugin).

we used to call interpretKeyEvents in the keyDown handler and the InsertText
handler would get the unicode string, I guess this stopped working with a
system update a while back.

Now i think there are 2 ways to do this:

1) subclass nsview and make it conform to the NSTextInputClient protocol

i have been picking away at this, i added the NSTextInputClient handlers but
they aren't being called. a working example or a pointer would help if
anyone has done this.

2) use a fake NSTextField and try to use that for gathering the unicode as
it arrives.

I have seen someone recommend NSWindow fieldEditor:forObject: to do this.
This sounds pretty bad and i have a lot of uncertainty as to how to make
this work right.

So do you guys have a recommendation here?

thanks in advance
_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to