On 20.02.2010, at 12:53, Tom Davie wrote:
> You want NSEvent's
> 
> + (id)addGlobalMonitorForEventsMatchingMask:(NSEventMask)*mask* handler:(void
> (^)(NSEvent*))*block*
> *and*
> *
> 
> + (id)addLocalMonitorForEventsMatchingMask:(NSEventMask)mask handler:(NSEvent*
> (^)(NSEvent*))block

 Nope, that's the wrong choice. This would give him copies of events sent to 
*other* applications as well (hence the "global").

 The sendEvent override seems like the most workable solution to me so far. 
Though I'd suggest not doing the work directly in your application instance. 
Instead, forward the event to your delegate. That way, you can use the same 
NSApplication subclass in your other apps. 

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://groups.yahoo.com/group/mac-gui-dev/

_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to