Le 23 déc. 2009 à 13:50, Graham Cox a écrit :

> 
> 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.


My bad, sorry for the misunderstanding.

-- Jean-Daniel




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to