Re: How to detect clicks outside of modal window?
Re: How to detect clicks outside of modal window?
- Subject: Re: How to detect clicks outside of modal window?
- From: Conrad Shultz <email@hidden>
- Date: Wed, 02 Nov 2011 18:03:00 -0700
On 11/2/11 5:46 PM, Vojtěch Meluzín wrote:
> Ok, folks please forget about the intentions, if they are bad, they will be
> badly rewarded :).
> Anyway I need it from Leopard. Is that really so hard to do such a trivial
> thing in Cocoa???
NSWindow's delegate protocol declares a -windowDidResignKey: method that
you may also find useful. But I suspect you are going to have trouble
because the window is modal; as a result I don't think that will be
called when you would like.
What you are describing is highly non-standard, and Cocoa behaves in a
manner to discourage behaviors that users may find confusing or
unexpected. A phrase commonly seen on this list is "don't fight the
framework."
Take note of the HIG's section titled "Embrace Modelessness" - you are
feeling the nudge of the framework. I also see that the HIG recommends
using a panel if possible, just as Scott recommended.
--
Conrad Shultz
Synthetiq Solutions
www.synthetiqsolutions.com
_______________________________________________
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