Re: End Editing with RETURN
Re: End Editing with RETURN
- Subject: Re: End Editing with RETURN
- From: Bill Cheeseman <email@hidden>
- Date: Thu, 05 Jun 2003 20:43:07 -0400
on 03-06-05 6:42 PM, Greg Titus at email@hidden wrote:
>
The documentation on NSText has a delegate message / notification named
>
-textDidEndEditing:.
>
On the other hand, the documentation for that method on NSTextField is
>
talking about an _implementation_ that handles an end of editing
>
notification....
I've puzzled over this distinction for a couple of years. I think you've
helped to make it a little clearer to me -- but I'm not sure yet.
>
So an NSTextField uses a field editor to edit the text. This field
>
editor is an NSText. The field sets itself as the delegate of the text,
>
therefore receiving the -textDidEndEditing: notification. The field
>
uses this notification both to do its own end editing processing, and
>
also to pass along its own -controlTextDidEndEditing: notification.
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.
But it's much too late in Vermont for me to be sure of anything.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
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.