• 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: NSTextField and bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextField and bindings


  • Subject: Re: NSTextField and bindings
  • From: Steve Sims <email@hidden>
  • Date: Wed, 5 May 2004 12:08:02 -0400

On 5 May 2004, at 06:07, Allan Odgaard wrote:
So unless you get KVV to work, I'd suggest disabling the automatic notification for the 'text' key (see automaticallyNotifiesObserversForKey: in NSKeyValueObserving). As an alternative you should also be able to send setText: using performSelectorAfterDelay:withObject:, to get out of the current "notification" -- although I have tested neither methods...

I received an off-list message that suggested using performSelector:withObject:afterDelay: in my validation routine to send notification of the change of value with will/didChangeValueForKey. Sure enough it works a treat.

I tried using the delayed notify in my setText: routine, but for some reason this didn't work. I'm not sure why, and since the only way setText: ever gets called in my app is through the bindings mechanism which also always calls the validation I'm not too fussed.

Of course to prevent double notifications I also wrote an automaticallyNotifiesObserversForKey: call to cut out automatic notification for my "text" key.

Thanks for the help!

Steve
_______________________________________________
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.


References: 
 >NSTextField and bindings (From: Steve Sims <email@hidden>)
 >Re: NSTextField and bindings (From: Fritz Anderson <email@hidden>)
 >Re: NSTextField and bindings (From: Steve Sims <email@hidden>)
 >Re: NSTextField and bindings (From: Allan Odgaard <email@hidden>)

  • Prev by Date: Re: Dealing with non-standard character sets
  • Next by Date: Re: GLobal Variables and Object
  • Previous by thread: Re: NSTextField and bindings
  • Next by thread: Re: NSTextField and bindings
  • Index(es):
    • Date
    • Thread