• 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: Immediate sending of changes to text fields
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Immediate sending of changes to text fields


  • Subject: Re: Immediate sending of changes to text fields
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Thu, 6 Dec 2007 11:17:40 +0100


Le 6 déc. 07 à 11:09, Kai Brüning a écrit :

I am having both a normal NSTextField and a NSTokenField, for which I need to process changes immediately after the user made a change. Both fields are connected to their controller via the value binding.

I tried to call -[NSController commitEditing] when receiving a NSControlTextDidChangeNotification. This does update the value, but also resigns the first responder state of the field in question, which is not wanted.

By searching this list I found a hint that -[NSControll validateEditing] might help, but it does not, at least for me.

Of course I can use -[NSControl objectValue] inside NSControlTextDidChangeNotification, but this is not really how bindings should work in my opinion.

This must be not so seldom a request, mustn't it?

Thanks,
Kai

In Interace Builder, in your binding settings, check the box: "Continuously Updates Value"


Jean-Daniel Dupas_______________________________________________

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: Immediate sending of changes to text fields
      • From: Kai Brüning <email@hidden>
References: 
 >Immediate sending of changes to text fields (From: Kai Brüning <email@hidden>)

  • Prev by Date: [JOB] Cocoa Developer in Stockholm, Sweden
  • Next by Date: [Leopard] CIContext thread safety [was: CGContextDrawShading crash a known problem?]
  • Previous by thread: Re: Immediate sending of changes to text fields
  • Next by thread: Re: Immediate sending of changes to text fields
  • Index(es):
    • Date
    • Thread