Key value observing?
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