Re: Finding the firstResponder TextField or TextView
Re: Finding the firstResponder TextField or TextView
- Subject: Re: Finding the firstResponder TextField or TextView
- From: "Mark's Studio" <email@hidden>
- Date: Tue, 21 May 2002 19:16:27 +0200
I had the same problem, but i had a custom fieldEditor and a custom
textField
in my fieldEditor i did [self delegate] to get my textField.
so maybe
[[window firstResponder] delegate]
will return the textfield.
On Tuesday, May 21, 2002, at 04:50 PM, John Nairn wrote:
>
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.
>
>
Peter Mark
Mark's Recording Studio A/S
Faelledvej 19 b DK2200 N
Copenhagen Denmark
Tel: +45 35366078 Fax: +45 35366038
www.marks-studio.dk
email@hidden
_______________________________________________
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.