• 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: Problem with NSNumberFormater
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with NSNumberFormater


  • Subject: Re: Problem with NSNumberFormater
  • From: Matt Neuburg <email@hidden>
  • Date: Thu, 19 Sep 2002 10:35:13 -0700

On Thu, 19 Sep 2002 10:26:19 +0200, Claudius Sailer
<email@hidden> said:

>I have a sheet with a NSForm (2 Cells, Second Cell is
>NSNumberFormatter) and 2 Buttons (Cancel and OK). The OK Button is
>disabled and should be enabled when in NSForm Cell 1 has length bigger
>0 and Cell 2 has length bigger 0 and is bigger 0. For this testing I
>use the KeyUp-Event.

Ouch. Cocoa is a big powerful complicated framework, don't hook into it at
such a low level when doing high-level stuff or you'll bollux yourself.

>But when I write 1 or 2 or 3 in the
>NSNumberFormatted Cell I get 1.0000 as feedback and the OK-Button is
>enabled.
>It seems that the Formatter aktives the format after the KeyUp-Event,
>but this is not what I want, because after that I can't write 1.234
>without a lot of trouble.
>Do I have an onther possibility to fix this problem?

Try the control delegate's controlTextDidChange: method or the window
delegate's windowDidUpdate: method. m.
--

matt neuburg, phd = email@hidden, http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart. http://www.tidbits.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.

  • Follow-Ups:
    • Re: Problem with NSNumberFormater
      • From: Claudius Sailer <email@hidden>
  • Prev by Date: Re: Command-Period Key Equivalent - Bad Idea?
  • Next by Date: Re: How to determine a toolbar's size?
  • Previous by thread: Problem with NSNumberFormater
  • Next by thread: Re: Problem with NSNumberFormater
  • Index(es):
    • Date
    • Thread