• 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: Daniel Jalkut <email@hidden>
  • Date: Wed, 4 Jun 2003 13:28:39 -0700

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:

Hi,
I subclassed an NSImageView to add drag and drop capabilities. Now
I want to highlight the view if it gets clicked on. (Pretty much like
iPhoto draws a blue rectangle arround a picture once you clicked on it)
Of course if the view is no longer active the surrounding rectangle
shall vanish. Drawing the rectangle itself is no problem but how can
I find out whether the view is active or not?

This might be documentated somewhere but I wasn't able to find it, maybe
because I don't know what I am looking for. So a pointer to the right
document or keywords of what I'm actually looking for would help me too.

Thanks in advance.
Christoph

--
4CD3 152A F59A 2788 3E29 9CC5 7502 DA0B 705B 0564
_______________________________________________
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.
_______________________________________________
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 to determine if a view is active
      • From: Tobias Hermann <email@hidden>
  • Prev by Date: Re: Instantiating NSCells in Interface Builder
  • Next by Date: converting rects between coordinate systems
  • Previous by thread: How to determine if a view is active
  • Next by thread: Re: How to determine if a view is active
  • Index(es):
    • Date
    • Thread