Re: How to copy Color Panel behaviour?
Re: How to copy Color Panel behaviour?
- Subject: Re: How to copy Color Panel behaviour?
- From: Ken Thomases <email@hidden>
- Date: Wed, 10 Sep 2014 16:32:22 -0500
On Sep 10, 2014, at 4:07 PM, Luc Van Bogaert <email@hidden> wrote:
> No succes so far with this.
>
> I subclassed NSPanel and overridden:
>
> - (BOOL) becomesKeyOnlyIfNeeded
> {
> return YES;
> }
>
> - (BOOL) canBecomeKeyWindow
> {
> return YES;
> }
>
> I also subclassed the collection view in the panel and overridden:
>
> - (BOOL) acceptsFirstResponder
> {
> return NO;
> }
>
> - (BOOL) needsPanelToBecomeKey
> {
> return NO;
> }
>
> Clicking the collectionview still makes the panel the key window, which is exactly what I'm trying to avoid.
What about the view hierarchy of the item that's actually been clicked within the collection view? What is actually becoming first responder?
Also, the release notes from when -becomesKeyOnlyIfNeeded was added seem to imply that it's for panels with NSNonactivatingPanelMask in their style mask. The rest of the docs don't include the same caveat, but it's worth checking.
Regards,
Ken
_______________________________________________
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