Re: Are views active or inactive?
Re: Are views active or inactive?
- Subject: Re: Are views active or inactive?
- From: Rick Mann <email@hidden>
- Date: Tue, 22 Dec 2009 19:51:04 -0800
On Dec 22, 2009, at 19:48:53, Jim Correia wrote:
> On Dec 22, 2009, at 10:45 PM, Rick Mann wrote:
>
>> I'm listening for that notification. Sure is a clunky way to do things. I've never used a view framework that didn't tell views when they became active/inactive.
>
> AppKit views don’t have a native active/inactive status like carbon HIToolbox controls.
>
> For views which alter their appearance based on whether or not they are first responder, or in a key/main window, you must track this state yourself.
Dumb.
>
>> I'm not sure viewDidMoveToWindow works here. I'm using it already for something else, and it gets called 3 times when my window is created, but never when activated.
>
> You can use viewWill/DidMoveToWindow to stop observing notifications on your preview window (if any) and start observing notifications on your new container window (if any), not for the tracking of the “active” state itself.
Problem still remains that it gets called 3 times. I just found out I was creating 3 tracking areas. Not sure if the willMoveToWindow is called in between.
--
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