• 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: NSNumberFormatter problem?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSNumberFormatter problem?


  • Subject: Re: NSNumberFormatter problem?
  • From: Bill Cheeseman <email@hidden>
  • Date: Thu, 18 Apr 2002 06:42:01 -0400

on 02-04-17 6:03 PM, Andreas Schwarz at email@hidden wrote:

> I have a few NSNumberFormatters in my nibs that are supposed to work
> with some text fields to keep the numbers the user can input within a
> certain range (standard formatter stuff).
>
> This works wonderfully, with one very odd exception. I'll set a minimum
> and a maximum (for example in one of them it is 8 and 128) and this
> works just fine (it won't allow the user to enter 4 or 300, for example)
> *with the exception of zero!* Zero can be entered despite the fact that
> it is below the minimum. This happens with all my formatters/text fields.

Don't enter a value for the zero setting, and it will work correctly.

Digging through the documents, I found that the zero setting is implemented
as a constant. Apparently Apple's code for checking the range you set with
the min and max settings doesn't handle the zero constant properly.

If I recall correctly, I reported this as a bug a few months ago.

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont - http://members.valley.net/croquetvermont
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >NSNumberFormatter problem? (From: Andreas Schwarz <email@hidden>)

  • Prev by Date: Re: Class hierarchy weirdness.
  • Next by Date: Re: iconForFile is slow
  • Previous by thread: Re: NSNumberFormatter problem?
  • Next by thread: NSTime controller
  • Index(es):
    • Date
    • Thread