• 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
Invalid number in bound text field
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Invalid number in bound text field


  • Subject: Invalid number in bound text field
  • From: "Tom Harrington" <email@hidden>
  • Date: Mon, 27 Nov 2006 18:14:57 -0700

I have an NSTextField which should only contain floats. So it has an
NSNumberFormatter.  It's also bound to a float in the controller.

If I enter something that's not a float (e.g. letters) and attempt to
tab out of the field, I get a sheet that pops up warning me I have an
invalid number.  It's functional but crude in that all it says is
"Invalid Number".  Is there some way I can substitute my own message
here, to say something a little more helpful?

I thought that control:didFailToFormatString:errorDescription: might
be what I wanted, but that just tells me the error that's being
displayed for the user, without any option to change it.  Other
delegate methods don't seem to apply.

--
Tom Harrington
email@hidden
AIM: atomicbird1
_______________________________________________

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


  • Follow-Ups:
    • Re: Invalid number in bound text field
      • From: Scott Stevenson <email@hidden>
  • Prev by Date: Re: How can I get an instance specific identifier?
  • Next by Date: Re: Should I do loops in reverse order ?
  • Previous by thread: Re: Should I do loops in reverse order ?
  • Next by thread: Re: Invalid number in bound text field
  • Index(es):
    • Date
    • Thread