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 protected]) > > 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: > https://lists.apple.com/mailman/options/cocoa-dev/michaelacrawford%40me.com > > This email sent to [email protected] _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
