CPTextField Lost Focus/Blur

8 views
Skip to first unread message

cristobal

unread,
Aug 13, 2009, 9:27:41 PM8/13/09
to Cappuccino & Objective-J
How can i detect if an textfield has lost focus, since the user has
clicked on another element or the mouse is outside the textfield.

Thanks in advance

Chandler Kent

unread,
Aug 13, 2009, 9:45:05 PM8/13/09
to Cappuccino & Objective-J
I think you are looking for the delegate method
controlTextDidEndEditing:.

More info at Apple's documentation:

http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSControl_Class/Reference/Reference.html#//apple_ref/occ/instm/NSObject/controlTextDidEndEditing:

Example:

http://gist.github.com/167582

Hope that helps!

Chandler
Reply all
Reply to author
Forward
0 new messages