Does anyone know how to prevent Cocoa from binding to set values back to the related property, but still trigger the default action selector?
I am trying to bind an NSTextField to the original NSString property on my data object. My data The object is similar to
...
@property (read-only) NSString * outCome;
- (invalid) otherMethodsAffectOutCome;
...
I bound NSTextField with the result property and in the default action handler, which I called -otherMethodAffectOutCome, and hopefully there will be / didChangeValueForKey to disable the object's property observer and return an NSTextField.
But this will not work, NSTextField will fail because it tries to set the changed text back using the setOutCome method ... I think I need the NSTextField to observe the property value change, but do not try to set the values when the text changes, How do I do this to do?
Thank! -Jonny
Jonny source
share