• 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
Number only NSTextField's
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Number only NSTextField's


  • Subject: Number only NSTextField's
  • From: Eric Gorr <email@hidden>
  • Date: Thu, 20 Dec 2007 23:33:06 -0500

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Number only NSTextField's
      • From: Apparao <email@hidden>
  • Prev by Date: Re: NSTask setStandardOutput bug?
  • Next by Date: Re: Opacity of Menus
  • Previous by thread: NSFileWrapper (directory) and internal folders
  • Next by thread: Re: Number only NSTextField's
  • Index(es):
    • Date
    • Thread