• 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
Re: Knowing if a view is first responder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Knowing if a view is first responder


  • Subject: Re: Knowing if a view is first responder
  • From: Nicko van Someren <email@hidden>
  • Date: Tue, 5 Apr 2005 15:37:40 +0100

On 5 Apr 2005, at 15:27, Michael Becker wrote:

is there any way to determine if a view is first responder? Right now, I have subclassed NSView and overrode -becomeFirstResponder and -resignFirstResponder to set an instance variable which I can query with my own added method -isFirstResponder. Am I reinventing the wheel here?

How about: if ([[myView window] firstResponder] == myView]) { // Do Stuff... }


	Nicko

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Knowing if a view is first responder (From: Michael Becker <email@hidden>)

  • Prev by Date: Re: Knowing if a view is first responder
  • Next by Date: MEETING: Chicago - Tuesday, April 5th
  • Previous by thread: Re: Knowing if a view is first responder
  • Next by thread: Re: Knowing if a view is first responder
  • Index(es):
    • Date
    • Thread