Are views active or inactive?
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