Re: cocoa-dev digest, Vol 2 #1919 - 12 msgs
Re: cocoa-dev digest, Vol 2 #1919 - 12 msgs
- Subject: Re: cocoa-dev digest, Vol 2 #1919 - 12 msgs
- From: Jean-Daniel Dupas <email@hidden>
- Date: Sun, 09 Feb 2003 15:53:16 +0100
Hello .
Don't can you overriding the -resignFirstResponder methode of the Class
Responder? Normally this methode is call when the field lose Focus.
>
>
--__--__--
>
>
Message: 5
>
Date: Sun, 9 Feb 2003 21:07:16 +1300
>
Subject: Duplicating Apple search field UI
>
From: Keith Bauer <email@hidden>
>
To: email@hidden
>
>
I'm trying to duplicate Apple's search field UI, where a piece of
>
grayed-out text indicates what will be searched as long as the field is
>
empty and doesn't have key focus.
>
>
I've subclassed NSTextField, and I can (apparently reliably) find out
>
when the user begins editing by overriding -becomeFirstResponder.
>
>
Unfortunately, I don't get a corresponding -resignFirstResponder when
>
the user stops editing the field. I can trap -textShouldEndEditing:,
>
and that works most of the time, but when the user clicks in the empty
>
text field and then clicks away again, I don't get any notification.
>
>
How can I reliably detect when my text field has gained and lost key
>
focus?
>
>
Thanks,
>
Keith
_______________________________________________
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.