• 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
Are views active or inactive?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Are views active or inactive?


  • Subject: Are views active or inactive?
  • From: Rick Mann <email@hidden>
  • Date: Tue, 22 Dec 2009 14:16:14 -0800

Hi. I realize this is a basic Cocoa question, but now that I need to know, I can't find the answer in the NSView or NSResponder docs.

Do NSViews have the notion of being "active" or "inactive?" My app architecture requires that I be able to differentiate, at draw time, between a (custom) view that is in the frontmost window (and technically, has focus), and a similar custom view that is in a non-frontmost window.

In my case, I have "Tool" objects (think of a line tool or rectangle tool in a drawing program). These are singleton objects in the app, and hence a line tool is shared among all document views. If the frontmost view is in the middle of a tool operation, and one of the inactive views updates its view, it shows the current tool drawing state (Tool objects get a chance to draw).

I'd like for my custom view to not give the Tool an opportunity to draw when it is not focussed/frontmost.

Thanks!

--
Rick

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Are views active or inactive?
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: Autorotation for a subview
  • Next by Date: Re: passing a method name?
  • Previous by thread: Re: Autorotation for a subview
  • Next by thread: Re: Are views active or inactive?
  • Index(es):
    • Date
    • Thread