Re: refusing first clicks for entire app
Re: refusing first clicks for entire app
- Subject: Re: refusing first clicks for entire app
- From: Nick Zitzmann <email@hidden>
- Date: Wed, 8 Dec 2004 18:40:00 -0700
On Dec 8, 2004, at 6:28 PM, Ken Victor wrote:
NSButton returns true for acceptsFirstMouse. i'd prefer not to have
this behavior and only have the first click activate my app. is there
someway, other than subclassing all my buttons, and any other controls
that may have similar behavior, to prevent first clicks from actually
propagating to controls? (i'd still like to maintain the ability for
clicks on the window controls - close, minimize, expand - to still
operate while my app is inactive.)
You could register the object for the notification that is broadcasted
when the window is no longer key (or implement the NSWindow delegate
method), and then disable whatever controls you wish to disable when
the notification selector is called. Of course, you'll also have to
re-enable them when the window becomes key again, but it'll still take
far less effort than subclassing.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden