Re: First click when activated
Re: First click when activated
- Subject: Re: First click when activated
- From: "Tim Buchheim" <email@hidden>
- Date: Tue, 9 May 2006 17:40:41 -0700
On 5/9/06, Valerio Ferrucci <email@hidden> wrote:
when my app is in background and the user click on the app window,
with a single the click he brings the app forward and make an action
(i.e. press a button on the window).
How can I avoid this?
that is: I want my user to do 2 clicks, one to activate the app and
one to make an action (press a button on the window etc...)
For the views which you don't want the user to be able to click on
while the window is not front-most, try overriding -
(BOOL)acceptsFirstMouse:(NSEvent *)theEvent
Views which are subclasses of NSControl typically return YES ... you
want to return NO. See the documentation at
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/NSView.html#//apple_ref/occ/instm/NSView/acceptsFirstMouse:
Note that the human interface guidelines suggest that most buttons and
other controls should allow click-through. Exceptions should be made,
however, for anything dangerous (such as a "delete" button) which you
don't want the user to click accidentally while attempting to bring
the window forward.
--
Tim Buchheim
_______________________________________________
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