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

Re: NSNumberFormatter in Panther


  • Subject: Re: NSNumberFormatter in Panther
  • From: p3consulting <email@hidden>
  • Date: Sun, 14 Dec 2003 09:46:11 +0100

I also have found some problems with NSFormatter's under Panther,
investigation showed that the main difference is that the
- (BOOL)getObjectValue:(id *)anObject forString:(NSString *)string
errorDescription:(NSString **)error
of the formatter is called on each key stroke when in Jaguar it was
called at the end
(tab, enter, click ouside of the field, closing the window)

The error string parameter is nil until the formatter is called for an
"end of editing" event.

Examples of formatters found in "Cocoa programming" by Anguish, Buck,
Yacktman work because they do test the error parameter, (as per
recommendation of the Apple documentation) but some examples from
Vermont Recipes do now crashes under Panther.

However I don't have seen the problem you describe with the standard
formatters clearing the whole field in case of errors.

Are you using built-in Cocoa formatters or formatters from a third
party ?

Pascal Pochet
P3 Consulting


On 13 dic. 2003, at 21:10, Chaz McGarvey wrote:

> Hello:
>
> NSNumberFormatters don't seem to work in Panther like they did in
> Jaguar. In Jaguar when the user typed something the formatter
> couldn't accept, it would just not accept that into the field (and it
> probably beeped or something). In Panther I find that an attached
> formatter causes the text field to be cleared of all it's text when a
> wrong key is pressed. Other weird things include not being able to
> make a number negative (by pushing dash) until at least on character
> of the number is entered. And if a user tries to type a number that
> is too big (when a maximum is set), then the text field is cleared.
>
> Is this really how it is supposed to work or is something wrong?
>
> Chaz McGarvey
> http://www.brokenzipper.com
> _______________________________________________
> 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.
_______________________________________________
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: NSNumberFormatter in Panther
      • From: Chaz McGarvey <email@hidden>
References: 
 >NSNumberFormatter in Panther (From: Chaz McGarvey <email@hidden>)

  • Prev by Date: Re: Odd memory issue -- not a newbie
  • Next by Date: Re: Bundle for Mail
  • Previous by thread: NSNumberFormatter in Panther
  • Next by thread: Re: NSNumberFormatter in Panther
  • Index(es):
    • Date
    • Thread