• 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: Issuing NSTextField action message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issuing NSTextField action message


  • Subject: Re: Issuing NSTextField action message
  • From: Kyle Sluder <email@hidden>
  • Date: Wed, 20 Aug 2014 13:18:21 -0500

On Wed, Aug 20, 2014, at 01:13 PM, Carl Hoefs wrote:
> I’m working on a financial system that accepts three variable user inputs
> to a formula. When the user types into any of the three textfields, it
> must update the other fields as the user types, without an Enter or
> Return. Think of it like a currency exchange program or temperature
> conversion, etc. so the user can immediately see the changes based on
> each stroke of the input (sort of like how Spotlight takes as much as
> you’ve typed in).
>
> So what I’ve managed to program so far is a KVO setup between three
> textfields, and when the user enters a number into any one of them — and
> presses Return — the others textfields update to reflect the new input.
> I’m trying to do this same thing but without the need for the Return.

NSTextField is not (documented to be) KVO-compliant. Don't try observing
it.

Instead, turn on the isContinuous property of your text fields (the
"Continuous" checkbox under the State group on the Properties
inspector). That'll send the text field's action on each keypress.

--Kyle Sluder

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Issuing NSTextField action message
      • From: Carl Hoefs <email@hidden>
References: 
 >Issuing NSTextField action message (From: Carl Hoefs <email@hidden>)
 >Re: Issuing NSTextField action message (From: Ken Thomases <email@hidden>)
 >Re: Issuing NSTextField action message (From: Carl Hoefs <email@hidden>)

  • Prev by Date: Re: Issuing NSTextField action message
  • Next by Date: Re: Issuing NSTextField action message
  • Previous by thread: Re: Issuing NSTextField action message
  • Next by thread: Re: Issuing NSTextField action message
  • Index(es):
    • Date
    • Thread