No events such as 'Editing did Change' for a NSTextField?
You need to set an object as the delegate of your NSTextField
. As NSTextField
is a subclass of NSControl
, it will call the -controlTextDidChange:
method on your object if you implement it.
@interface MyObject : NSObject{ IBOutlet NSTextField* textField;}@end@implementation MyObject- (void)awakeFromNib{ [textField setDelegate:self];}- (void)controlTextDidChange:(NSNotification *)notification{ if([notification object] == textField) { NSLog(@"The contents of the text field changed"); }}@end