Re: Tracking changes of first responder
Re: Tracking changes of first responder
- Subject: Re: Tracking changes of first responder
- From: Dustin Voss <email@hidden>
- Date: Tue, 13 Jul 2004 11:37:16 -0700
On 13 Jul, 2004, at 6:05 AM, Matthew Weinstein wrote:
Dear cocoa-xperts,
I've run into a strange problem with handling an NSTextField which has
an action associated with it. The action was intended to be called
when the user filled in some text and hit return. HOWEVER, the action
also seems to be called if the NSTextField loses first responder
status, i.e., if the user clicks on the NSTextView in the window or a
NSTableView in the window. So I'm thinking I need a flag or something
when the first responder status changes that signals the action to do
nothing (but reset the flag) in that case.
The problem is I can't seem to find a delegate method or notification
that goes with changes of firstresponder status... Help!
Must be there (i would guess)
There isn't one. However, you can subclass NSWindow and override
makeFirstResponder: to do this. I have done this already; my class is
titled ResponderNotificationWindow and can be downloaded at
http://homepage.mac.com/d.j.v./FileSharing13.html.
_______________________________________________
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.