• 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: number formatting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: number formatting


  • Subject: Re: number formatting
  • From: email@hidden
  • Date: Fri, 22 Feb 2002 12:56:51 -0800

This is not a bug (it is a side-effect of using floating point
precision).

I don't agree with that. An object as big as a TextField (and intended
for users that don't know anything about IEEE floats) should know how to
handle truncation effects; even without a formatter. The fact is, the
behavior has been in Cocoa for 5 years or so, many people comment on it,
no one has done anything about it.

Um... nobody has done anything about it because it's not regarded as a bug, would be my guess. :-> Modularity of design is good. If you want your value formatted, use an NSFormatter. If you want a cheaper solution, use setStringValue: and format the string yourself. But building in code in NSTextfield that lets you set things like the precision, the exponent format, etc. would be an exceedingly bad design, IMHO.

Ben Haller
Stick Software
_______________________________________________
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.

  • Follow-Ups:
    • Re: number formatting
      • From: Lance Bland <email@hidden>
  • Prev by Date: Re: Quartz call to generate shadows?
  • Next by Date: Re: Programming NSImageView
  • Previous by thread: Re: number formatting
  • Next by thread: Re: number formatting
  • Index(es):
    • Date
    • Thread