Hi...
I am just starting with OSX development, and I am trying to get delegate notifications from a NSTextField. I've got the following code so far:
This is where I set the delegate:
- (void) awakeFromNib {
NSLog(@"Setting delegate");
[amountField setDelegate: [[TextfieldController alloc] initWithLog]];
}
And this is my TextfieldController:
- (TextfieldController *) initWithLog {
self = [super init];
NSLog(@"TextfieldController initialized");
return self;
}
- (void)textDidChange:(NSNotification *)aNotification {
NSLog(@"textdidChange");
}
- (void)keyUp:(NSNotification *)aNotification {
NSLog(@"keyUp");
}
However, neither textDidChange nor keyUp is ever called... Not sure what I'm missing here, because the same way works just fine when I use it for my main window with the windowDidMiniaturize notification...
Anyone able to help? :)