Re: How to: NSPopover Refuse First Responder?
Re: How to: NSPopover Refuse First Responder?
- Subject: Re: How to: NSPopover Refuse First Responder?
- From: Andy Lee <email@hidden>
- Date: Thu, 21 Mar 2013 00:44:44 -0400
On Mar 20, 2013, at 11:44 PM, Graham Cox <email@hidden> wrote:
>
> On 21/03/2013, at 12:53 AM, Brad Stone <email@hidden> wrote:
>
>> How can I have a popover appear but have the NSSearchField never relinquish it's firstResponder status or have the NSPopover refuse firstResponder?
>
>
> I think you'll need to ensure that none of the views in the popover accept first responder, which is a pain to do (and if they need to become first responder under some circumstances, might be impossible in the current implementation).
Worth a try but I have a feeling even this wouldn't be enough, because the popover's window could still become key window even if no view within accepts first responder. I suspect this is why it didn't help to have the NSPopover object refuse first responder.
It would be nice if there were a way to get the popover's window to refuse first responder. I fiddled briefly with Apple's NSPopover sample app and haven't found a way yet to do this. Unfortunately, the window is an instance of a private class (_NSPopoverWindow), which means you don't get a chance to subclass it and override canBecomeKeyWindow.
The opacity of NSPopover is very reminiscent of NSDrawer.
--Andy
>
> File a bug asking for something like -becomesKeyOnlyIfNeeded on NSPopover. The API is currently too limited.
>
> --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
_______________________________________________
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