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

Immediate sending of changes to text fields


  • Subject: Immediate sending of changes to text fields
  • From: Kai BrĂ¼ning <email@hidden>
  • Date: Thu, 6 Dec 2007 11:09:31 +0100

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
_______________________________________________

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: Jean-Daniel Dupas <email@hidden>
    • Re: Immediate sending of changes to text fields
      • From: Knut Lorenzen <email@hidden>
  • Prev by Date: Re: CoreData and NSAttributedString
  • Next by Date: Re: Immediate sending of changes to text fields
  • Previous by thread: Re: Enabling Caching in Web-kit based cocoa application
  • Next by thread: Re: Immediate sending of changes to text fields
  • Index(es):
    • Date
    • Thread