Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: insertText: without a NSWindow/NSView (or: Unicode input without NSView/Window)




On 30/01/2008, at 7:21 PM, Ken Thomases wrote:

Why do you not process all of the characters in the event? In other words, [[even characters] length] may be greater than 1. There should be a COMBINING ACUTE ACCENT (u0301) character following the "e".

If the game engine needs precomposed characters, then you can call - [NSString precomposedStringWithCanonicalMapping] on the string, first. Note that this is orthogonal to my previous point. It is _not_ guaranteed to reduce the length to 1.

Sorry, I forgot to mention that my event handler prints [event characters] and its length (using [[event characters] length]) to the console. The length is always 1 or 0, even for composite key events. ie, the keydown event for option-e results in "" (blank) and a length of 0. The next key press (the e) just returns "e" and 1.


So if I could get a longer character string that would be a start, but [event characters] is never longer than 1 character.

I don't know the solution to this. However, most input sources other than the keyboard would be unavailable in full-screen mode, anyway. Right? So, you should be able to get by with the ordinary NSWindow/NSView methods.

That is a fair point, but I was under the assumption that if I were to implement text input correctly other input sources would "just work", and hence the only issue is the fact that they can't be accessed when the application is fullscreen.


Regards,
Adam
_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >insertText: without a NSWindow/NSView (or: Unicode input without NSView/Window) (From: Adam Zegelin <email@hidden>)
 >Re: insertText: without a NSWindow/NSView (or: Unicode input without NSView/Window) (From: Ken Thomases <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.