• 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
Formatter questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Formatter questions


  • Subject: Formatter questions
  • From: Andy Bettis <email@hidden>
  • Date: Fri, 24 Jun 2005 09:02:34 +0100

Hi folks,

I'm setting out a data entry sheet which contains a date field, so I added a date formatter to the text edit field. When testing it I found the following behaviour:

If the date is wildly invalid (characters that don't fit the format string) it just beeps.
If the date is invalid but fits the format string (e.g. 99/99/99) it 'fixes' it (in this case to 03/08/99).


While I can live with the first one the second is of no help in my app - if the user has typed in a date that is invalid I want to tell them why and leave it to them to come up with a valid one. Is this the usual behaviour for an input date formatter?

I also set up an 'amount' field and added a number formatter with 9999.99 as the format string. When I type in 9.999 it comes up as 10.00. Obviously this is no good for an accounting program!

It looks like these formatters are designed to result in a valid value unless they really can't manage it. As I need to only allow valid data exactly as the user has entered it I guess I'll have to write my own formatting rountines, at least for input. Have I got this right?

Cheers,

Rev. Andy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Formatter questions
      • From: James Bucanek <email@hidden>
  • Prev by Date: Re: Parent entities
  • Next by Date: Re: NSTabView problem under Tiger
  • Previous by thread: Re: (Inverse) relationship lost after being set properly
  • Next by thread: Re: Formatter questions
  • Index(es):
    • Date
    • Thread