Subclass the NSTextField and overwrite the
- (BOOL)becomeFirstResponder
method, defined in the NSResponder class (a superclass of NSTextField), like so:
- (BOOL)becomeFirstResponder {
BOOL flag=[super becomeFirstResponder];
if(flag)
{
// text field will become first responder
}
return flag
}