Re: How can I detect a mouse click outside a child window on Leopard?
Re: How can I detect a mouse click outside a child window on Leopard?
- Subject: Re: How can I detect a mouse click outside a child window on Leopard?
- From: Michael Crawford <email@hidden>
- Date: Tue, 14 Feb 2012 08:39:07 -0500
I was just looking at the documentation for NSApplication and wondering if overriding sendEvent is the way to go? I was thinking I could monitor events dispatched to my app and then, when one arrives that is not destined for the child window, dismiss the popover. I can also dismiss the popover if the application loses focus.
I haven't tried these ideas out yet, but will do so later on today. If you know these ideas will not work or you have alternates, please feel free speak up.
-Michael
On Feb 14, 2012, at 8:22 AM, Michael Crawford wrote:
> I've implemented something like NSPopover on Leopard (10.5). I would like this popover to disappear if the user clicks anywhere outside of the popover but I'm not sure how to do this. Theoretically, I should be able to make the child window modal but I'm not sure that would help. Also, I assume there is a way to capture the mouse from a given window but I've never done that before either.
>
> Suggestions?
>
> -Michael
> _______________________________________________
>
> 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