NSTextView, resignFirstResponder and textShouldEndEditing
NSTextView, resignFirstResponder and textShouldEndEditing
- Subject: NSTextView, resignFirstResponder and textShouldEndEditing
- From: Aaron Tuller <email@hidden>
- Date: Mon, 4 Aug 2003 02:17:58 -0700
sigh, I sent this a few hours ago, and of course I meant my
textShouldEndEditing method wasn't being called, not
textShouldChange. I only want to validate after the user leaves the
text view, not right after the drag. sorry for the typo, here is
what I meant to write:
I think I'm missing something here, I have a subclass of NSTextView
to accept a custom type (a vCard). Works great. However, I have a
delegate attached to my view and I validate the text in a
textShouldEndEditing: method in the delegate. This works great when
the text is typed in but when I setString: in my
readSelectionFromPasteboard:type: method it doesn't mark the text as
being edited so my delegate method never gets called when it loses
first responder. I even explicitly do this around my setString: call:
[[self window] makeFirstResponder:self];
[self setString:stringBuilder];
[self didChangeText];
[[self window] makeFirstResponder:nil];
and still my textShouldEndEditing: doesn't get called. Am I doing
something wrong? I couldn't find anything that seemed to tell the
text view that it has been edited other than didChangeText. I
verified that the TextView subclass is getting a
"resignFirstResponder" call so should I completely override it and
call my delegate explicitly?
Thanks for the help.
-aaron
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.