Re: Number only NSTextField's
Re: Number only NSTextField's
- Subject: Re: Number only NSTextField's
- From: Apparao <email@hidden>
- Date: Fri, 21 Dec 2007 10:20:08 +0530
Write your own custom formatter, which is subclass of NSFormatter.
Read the following article exists in your machine:
file:///Developer/ADC Reference Library/documentation/Cocoa/
Conceptual/DataFormatting/index.html
- Apparao.
Effigent Inc.
On Dec 21, 2007, at 10:03 AM, Eric Gorr wrote:
I found this old thread:
http://lists.apple.com/archives/cocoa-dev/2002/Sep/msg00112.html
which suggests applying a NSNumberFormatter to my field.
I have been able to do this and, while it does seem to only accept
actually numbers in the field (the focus won't change to another
control until it is a number), I can still type letters, etc. into
the field as well.
I would prefer that it just beep when I enter a letter, etc. and
for that letter to never appear in the field.
What is the best way to accomplish this?
Thank you.
_______________________________________________
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:
40effigent.net
This email sent to email@hidden
_______________________________________________
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