custom NSTextField issue
custom NSTextField issue
- Subject: custom NSTextField issue
- From: Stefan Schüßler <email@hidden>
- Date: Sat, 2 Aug 2003 10:43:15 +0200
I'm trying to customize a NSTextField the way the search fields work in
Mail and Safari. I.e. it should display a gray text if the field is
(left) empty and delete this text if the user enters the field.
Subclassing NSTextField and overriding becomeFirstResponder works fine
in the latter case. However, overriding resignFirstResponder does not
work as expected, as a NSTextField yields control (first responder) as
soon as it is activated. Therefore I'm unable to tell when the user is
leaving the text field. NSTextField's textShouldEndEditing method does
now work either since it is only called if the user has actually
entered some text. Tabbing in and out the text field does not send this
message.
Any suggestions?
Stefan
_______________________________________________
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.