Currently I have a project with an AppController which has the standard MainMenu.xib, with main window and menu bar, I have added a NSViewController class to the project, which controls and displays a custom view class, which is a NSBox subclass, with a xib file that has the NSBox in Inteface Builder.
I have added several TextFields to the box in IB, the app controller gets the view controller to add the box view to the main window, as a subview, that all works as it should, and the text fields all recieve the focus and first responder status as they should with the tab key or mouse click.
My question is, how can I monitor which text field has the focus?
I have IBOutlets to all of the text fields in the NSBox subclass at the moment, and have used the NSResponder keyUp: method to check which text field has first responder status, but the mouse events dont work in the NSBox subclass as the text fields themselves recieve the mouse down and mouse up events, so can not check which text field has been clicked.
I'm sure there is a simple awnser I missing, but How can I check the active text field, when the field is clicked by the mouse, and not tabbed to by the keyboard?
Thanks in advance Mark
I have added several TextFields to the box in IB, the app controller gets the view controller to add the box view to the main window, as a subview, that all works as it should, and the text fields all recieve the focus and first responder status as they should with the tab key or mouse click.
My question is, how can I monitor which text field has the focus?
I have IBOutlets to all of the text fields in the NSBox subclass at the moment, and have used the NSResponder keyUp: method to check which text field has first responder status, but the mouse events dont work in the NSBox subclass as the text fields themselves recieve the mouse down and mouse up events, so can not check which text field has been clicked.
I'm sure there is a simple awnser I missing, but How can I check the active text field, when the field is clicked by the mouse, and not tabbed to by the keyboard?
Thanks in advance Mark