How to observe the value of an NSTextField
问题 This might seem straightforward, but the following code does not work, because the "observeValueForKeyPath" function is never called, although I keep changing the text in the NSTextfield: - (void)awakeFromNib { [myNSTextField addObserver:self forKeyPath:@"value" options:NSKeyValueObservingOptionOld context:nil]; } - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { NSLog(@"observeValueForKeyPath"); } The log message @