• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Finding the firstResponder TextField or TextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Finding the firstResponder TextField or TextView
      • From: "Mark's Studio" <email@hidden>
  • Prev by Date: jagged looking text ?
  • Next by Date: Re: some OS X architectural questions
  • Previous by thread: jagged looking text ?
  • Next by thread: Re: Finding the firstResponder TextField or TextView
  • Index(es):
    • Date
    • Thread