Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSearchField - detect loss of focus



On Jul 29, 2006, at 5:42 PM, Matt Neuburg wrote:

On Sat, 29 Jul 2006 11:51:45 -0400, Jim Correia <email@hidden>
said:
I have an NSTextField subclass
that wants to know when it is no longer "firstResponder".

I put firstResponder in quotes because NSTextField is never
firstResponder for long. In -becomeFirstResponder it sets up the
field editor and makes it the firstResponder. (Thus overriding -
resignFirstResponder doesn't help, since that happens right away.)

Have I missed something obvious, or is this simply incorrect advice?

I'm not understanding why controlTextDidEndEditing: doesn't do it for you.
It corresponds exactly to everything I think of intuitively as "loss of
focus". Have you some counter-example?

The problem is that I don't know what know that editing is over, I really want to know when the text field is no longer being edited via the field editor. (The text field subclass wants to draw extra adornment in this case.)


-textDidEndEditing: is sent when the user presses Enter, and the field editor is still first responder.

Thanks,
Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: NSSearchField - detect loss of focus (From: Matt Neuburg <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.