• 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
Key value observing?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Key value observing?


  • Subject: Key value observing?
  • From: John James <email@hidden>
  • Date: Sun, 5 Dec 2004 08:45:05 -0500

I am having problems with simple Key value observing with a NSTextField into a NSString in my model. (I haven't found an example of this case. Many examples of much harder array stuff, but not this )
in IB, I make an NSObjectController (called MyFileController) associated with an object in my FileOwner (theSession)


I bind the view's NSTextField to a NSString in theSession. with appropriate KeyPath
(selection.currentLocomotion[MyFileController]) .


I change the NSString: currentLocomotion programatically in theSession. (confirmed in the run log)
Shouldn't the view's NSTextField show the latest value? It doesn't in my code.


I even included:
[ self willChangeValueForKey:@"currentLocomotion" ];
...
[ self didChangeValueForKey:@"currentLocomotion" ];
around the changing code in my setCurrentLocomotion method.
From my reading i don't think this is needed, as I set with the KVC method.


The attributes of the NSTextField are:
	Enabled YES
	Editable NO

Any suggestions or examples would be appreciated. Thanks.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Key value observing?
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: Framework installation???
  • Next by Date: Re: Absolute Value |x - y|
  • Previous by thread: Re: Easier way to call NSBrowser's delegate from browser matrix?
  • Next by thread: Re: Key value observing?
  • Index(es):
    • Date
    • Thread