• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: force NSTextField to accept only Roman, or the other character codes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: force NSTextField to accept only Roman, or the other character codes


  • Subject: Re: force NSTextField to accept only Roman, or the other character codes
  • From: Martin Wierschin <email@hidden>
  • Date: Fri, 7 Mar 2008 18:25:56 -0800

Hi Norio,

So when the cursor comes to the text field, I want input method to change suitable characters depending on the text field.
Not using validation after user types something in it.

There's no Cocoa API for switching the keyboard/input method. However, on Leopard you can use Text Input Source services to do what you want:


http://developer.apple.com/documentation/TextFonts/Reference/ TextInputSourcesReference/Reference/reference.html

It's works very nicely. On Tiger and under you're stuck with Keyboard Layout services:

http://developer.apple.com/documentation/Carbon/Reference/ KeyboardLayoutServices/DeprecationAppendix/AppendixADeprecatedAPI.html

Which, in my opinion, is buggy and incomplete.

~Martin

_______________________________________________

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


References: 
 >force NSTextField to accept only Roman, or the other character codes (From: norio <email@hidden>)

  • Prev by Date: Re: Trying to intentionally create a memory leak
  • Next by Date: Re: NSTextView changes font
  • Previous by thread: force NSTextField to accept only Roman, or the other character codes
  • Next by thread: Re: force NSTextField to accept only Roman, or the other character codes
  • Index(es):
    • Date
    • Thread