Re: Disabling items of "Input Menu"
Re: Disabling items of "Input Menu"
- Subject: Re: Disabling items of "Input Menu"
- From: Andrew Farmer <email@hidden>
- Date: Wed, 23 May 2007 18:25:31 -0700
On 23 May 07, at 04:26, David Lobo wrote:
I am developing a network based application wherein I need to use
IP Address field. When I enter digits in the IP field, by setting
unicode language in the Input Menu unicode characters are getting
displayed in panther. Due to this I am not able to search for the
IP address properly. And also my formatter fails to accept digits,
if the "Input Menu" is set to unicode language.
I wanted to know how to disable the menu items of "Input Menu". In
system preference when we click on the "IP Addres:" field (At
"Configure IPv4" Manually page) all unicode menu items will be
disabled automatically. I need to include similar feature for my
application. Is there any cocoa API to implement this feature? Or
at least is it possible to always allow only "U.S" option in the
"Input Menu" for the IP address text field, so that when user
selects other language, again set it back to US programatically
when the focus is on IP address text field.
You're going about this the wrong way. The input menu isn't your
problem - all that affects is what buttons on the keyboard create
what characters. (Some keyboard layouts may actually remap the number
keys entirely - the original DVORAK recommended that the row be
ordered 7531902468, and forcing the QWERTY layout could seriously
annoy such users.) Your problem is that your field is accepting
characters that aren't valid in an IP address. What you want is a
custom formatter for the field that'll only accept IP addresses. Read
Apple's "Introduction to Data Formatting Programming Guide For
Cocoa" (available online) for more information.
If you've already got a formatter, there's something wrong with it.
Show us what you're doing.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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