Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handling right click only



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: Handling right click only (From: Severin Kurpiers <email@hidden>)
 >Re: Handling right click only (From: Alexander Griekspoor <email@hidden>)
 >Re: Handling right click only (From: Peter Maurer <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.