Re: End Editing with RETURN
Re: End Editing with RETURN
- Subject: Re: End Editing with RETURN
- From: Greg Titus <email@hidden>
- Date: Thu, 5 Jun 2003 18:16:23 -0700
On Thursday, June 5, 2003, at 05:43 PM, Bill Cheeseman wrote:
So, you're saying that the text field gets information from the
notification
it observes from the field editor, which enables the text field to
distinguish among the various keys the user might have pressed to end
editing. But that information does not get passed along to me, the
user/developer, because all I can observe is the
-controlTextDidEndEditing:
notification from the text field, which only gives me a userInfo
dictionary
with an NSFieldEditor key. Which is what I thought in the first place.
The NSTextMovement userInfo information can only be obtained by
subclassing
NSTextField. Did I get that right? If so, I simply misunderstood the
context
of your initial message, which was about subclassing NSTextField.
Exactly. You are right about everything else... if you are simply
observing NSTextField instead of subclassing then the
-controlTextDidEndEditing: notification isn't enough.
If you are a user of an NSTextField though, you can distinguish tabs
from returns by watching the NSTextField for
-controlTextDidBeginEditing:, grab the NSText field editor from the
information on that notification, and register yourself for the NSText
-textDidEndEditing:, so you will receive the notification directly in
addition to what the field itself does.
Hope this helps,
- Greg
_______________________________________________
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.