• 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
how do I get the "key" sub view of a window?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how do I get the "key" sub view of a window?


  • Subject: how do I get the "key" sub view of a window?
  • From: Donald Hall <email@hidden>
  • Date: Tue, 10 Dec 2002 00:15:44 -0700

My window contains two NSTextFields. When my window becomes key, I want to be able to select the text of the field that was last typed in when the window was previously the key window. How do I obtain a reference to the correct text field?

[myWindow initialFirstResponder] returns the text field I chose as initial first responder in IB, as I would expect.

However, [mywindow firstResponder] returns an NSTextView, presumably the content view of the window.

NSTextView does not accept the message firstResponder.

I'm sure I must be missing something easy, but I couldn't find anything in the documentation that would do what I want.

Thanks for any pointers,

Don
----------------------------------------------
Donald S. Hall, Ph.D.
Apps & More Software Design, Inc.
http://www.theboss.net/appsmore
_______________________________________________
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: how do I get the "key" sub view of a window?
      • From: Nicholas Riley <email@hidden>
  • Prev by Date: Re: orderOut a sheet while app is hidden
  • Next by Date: overriding the save panel view
  • Previous by thread: Re: NSClassFromString()
  • Next by thread: Re: how do I get the "key" sub view of a window?
  • Index(es):
    • Date
    • Thread