Re: Handling right click only
Re: Handling right click only
- Subject: Re: Handling right click only
- From: Alexander Griekspoor <email@hidden>
- Date: Tue, 14 Dec 2004 10:12:26 +0100
Well, I made a start, but what do I fill in to make the event be ignored in the else part:
- (void)sendEvent:(NSEvent *)anEvent{
NSEventType type = [anEvent type];
if (type==NSRightMouseDown) || (type==NSLeftMouseDown && ([anEvent modifierFlags] & NSControlKeyMask)){
} else {
// WHAT HERE TO IGNORE THIS EVENT BY MY APP AND FORWARD THE EVENT TO THE NEXT APP?
}
}
Op 14-dec-04 om 10:07 heeft Peter Maurer het volgende geschreven:
Thanks Severin, but this is not exactly what I need, the question is, can an event fired to [self nextResponder] end up eventually at a different application? What I want is all events to be redirected as if my window wasn't there, except for right mouse clicks:
The situations is as follows (as seen from the side):
**** **** **** finder icons
----------------- my semi transparent CD window
++++++++++ finder desktop
The moment I disable the clickthrough of my window it will start catching all mouse events away from the finder, even though its desktop icons are projected above my window....
Alex
Have you tried overriding your NSApp's -sendEvent: method?
Peter.
*********************************************************
** Alexander Griekspoor **
*********************************************************
The Netherlands Cancer Institute
Department of Tumorbiology (H4)
Plesmanlaan 121, 1066 CX, Amsterdam
Tel: + 31 20 - 512 2023
Fax: + 31 20 - 512 2029
AIM: email@hidden
E-mail: email@hidden
Web: http://www.mekentosj.com
iRNAi, do you?
http://www.mekentosj.com/irnai
*********************************************************
_______________________________________________
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