0

I have an NSTextFeild Subclass in which I would like to implement textDidEndEditing: to check after each edit if it is empty or not. The method is being called perfectly, but when I click into another NSTextField (or a subclass), all the text that was in the first textfield is immediately deleted. If I click out into the view, the text stays, but is deleted the next time i click into another textfeild. All I have in the method right now is an NSLog. Does anyone have any ideas as to why this could be happening?

#import "BufferTableCellViewTextField.h"

@implementation BufferTableCellViewTextField

- (void)textDidEndEditing:(NSNotification *)notification{
    NSLog(@"END");
}

@end
Matt Cooper
  • 2,042
  • 27
  • 43

2 Answers2

3

You need to call -super:

- (void)textDidEndEditing:(NSNotification *)notification;
{
    [super textDidEndEditing:notification];
    NSLog(@"END");
}
Wil Shipley
  • 9,343
  • 35
  • 59
0

This delegate method wouldn't be causing your problem. I'd look back to your subclass and check to see that you are not using any UITextField delegate methods that are expecting a YES response that you may have inadvertently changed the return responses for. It may be helpful to post you subclass so we can see what is going on in there too...

Paul Bonneville
  • 1,905
  • 2
  • 13
  • 17