On 2010 Feb 03, at 00:34, padmakumar wrote:

> In my Cocoa based application, I am having a user editable NSTextField.
> I need to know when the user selects the NSTextField using mouse.
> I tried the delegate method controlTextDidChange, but the problem is user 
> need to enter an character to get this delegate invoked.
> My requirement was when ever user selects the NSTextField, I need to know 
> that.

Maybe knowing when it becomes First Responder would work.  NSTextField inherits 
from NSResponder.  From documentation:

-[NSResponder becomeFirstResponder]
Notifies the receiver that it’s about to become first responder in its NSWindow.

- (BOOL)becomeFirstResponder

Discussion
The default implementation returns YES, accepting first responder status. 
Subclasses can override this method to update state or perform some action such 
as....


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to