• 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: How to determine if a view is active
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to determine if a view is active


  • Subject: Re: How to determine if a view is active
  • From: Tobias Hermann <email@hidden>
  • Date: Thu, 5 Jun 2003 00:25:42 +0200

hi

here is an additional hint to determine if you are the first responder at the moment:

if ([[self window] firstResponder] == self) {
...
}

On Wednesday, June 4, 2003, at 10:28 PM, Daniel Jalkut wrote:

Hi Christoph - I believe what you're asking is how to know when you have become "first responder" (in Carbon it's "focused").

Look at the acceptsFirstReponder method of NSResponder. If you override that method to return YES, then you should receive a "becomeFirstResponder" method call when your view is being "focused" in the UI. You might not even need to do the outline drawing, because your superclass might do it for you, I'm not sure.

Daniel

On Wednesday, June 4, 2003, at 08:58 AM, Christoph Gerdes wrote:
_______________________________________________
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.

References: 
 >Re: How to determine if a view is active (From: Daniel Jalkut <email@hidden>)

  • Prev by Date: converting rects between coordinate systems
  • Next by Date: [OT] compiler errors
  • Previous by thread: Re: How to determine if a view is active
  • Next by thread: NSDocument help
  • Index(es):
    • Date
    • Thread