Re: Are views active or inactive?
Re: Are views active or inactive?
- Subject: Re: Are views active or inactive?
- From: Graham Cox <email@hidden>
- Date: Wed, 23 Dec 2009 23:50:25 +1100
On 23/12/2009, at 10:15 PM, Jean-Daniel Dupas wrote:
>> Did you happen to have an 'a-ha' moment when you typed that sentence? "Views" don't generally have an active/inactive state. Controls, which are a special case of view, do. So have you considered making your custom view an NSControl instead of a simple NSView?
>>
>> That's the thing, you see. "Inactive" means the user can't interact with it. But the user can't interact with a view that's not a control anyway, so the state has no meaning.
>
> and 'active' is called 'enabled' in Cocoa.
Logically, enabled and active are two separate states - you can have a disabled control in an active window.
But, controls typically draw the same way if either of these are false (i.e. the 'disabled' appearance).
Views inherit the active state from their windows, so can ask their window for that state any time they need to know.
--Graham
_______________________________________________
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