Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

NusuniAdmin

macrumors 6502a
Original poster
How would I go about getting the currently focused control? I mean there has to be some method I am missing that will return an identifier for the currently focused control.

Also is there a method or something that is called each time a control gets focused and loses the focus.


The reason I am asking is I want some specific things to happen when a control gets its focus and when it loses it.
 
You can call the window's firstResponder to get a pointer to the object with that status. Is that what you mean?

This article contains an example; see textObjectToSearchIn
 
hmm how come when resignFirstResponder i cannot edit the text in the text field?

like [self setStringValue😡"bla"]; does nothing at all in the resignFirstResponder method.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.