• 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
[SOLVED]RE: NSNumberFormatter question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SOLVED]RE: NSNumberFormatter question


  • Subject: [SOLVED]RE: NSNumberFormatter question
  • From: "Peter Karlsson" <email@hidden>
  • Date: Mon, 8 Nov 2004 13:38:57 +0100

I subclassed the formatter and wrote some code to take care if it, that
solved my problem.

Code is something like this:

If first char is 0, accept no more chars

Ursprungligt meddelande

> Dear list!
>
> I want my NSNumberFormatter to accept values between 0 and 31. There is no
> problem with that. But I can type many '0' (zero) in the field. So my
> question is: Is it possible to set the formatter so if I type a '0' I can
> not type another '0' in the field? The idea is that a 0 is always a 0 even
> if it's 0000000 long :)
>
> Example:
> I can type: 00000000 -> forever...
> I want formatter to stop after typing: 0
>
> Best regards Peter
>
>  _______________________________________________
> 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
>

 _______________________________________________
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

  • Prev by Date: Re: New Spotlight Info
  • Next by Date: NSPopUpButtonCell in subclass of NSCell - Selection not working
  • Previous by thread: Re: get subimage from an NSImage
  • Next by thread: NSPopUpButtonCell in subclass of NSCell - Selection not working
  • Index(es):
    • Date
    • Thread