Finding the firstResponder TextField or TextView
Finding the firstResponder TextField or TextView
- Subject: Finding the firstResponder TextField or TextView
- From: John Nairn <email@hidden>
- Date: Tue, 21 May 2002 08:50:57 -0600
I have a need to find which text area is currently the active one in a
window (a window with several TextFields and two TextViews). When I tried
[window firstResponder]
it did not work as expected. In the debugger I found this was returning
a pointer to the window's field editor, but I did not see a way to find
out which cell was the one being edited. Is there a way?
Furthermore: although my NSDocument subclass has a window outlet (it is
automatically there) and I connected it to my window, the window
variable is always nil. For the above I had to use:
[[uiObject window] firstResponded]
Is there a way to make the standard window outlet in my document
controller class have a pointer to the main document window?
----------------
John Nairn (1-801-581-3413, FAX: 1-801-581-4816)
Web page:
http://www.mse.utah.edu/~nairn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.