Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Event filter?

Event filter?
Thread Tools
Forum Regular
Join Date: Jan 2002
Status: Offline
Reply With Quote
Feb 3, 2002, 10:14 PM
 
Does anybody know of some example code where you can sit and watch/intercept events from the application in the foreground? I knew how to do this in OS 9, no idea where to start in OS X.
     
Dedicated MacNNer
Join Date: Jan 2001
Location: Boulder, CO, USA
Status: Offline
Reply With Quote
Feb 4, 2002, 09:41 AM
 
not sure if this is quite what you meant, but on the Carbon tips and tricks page, there's this tip:

What CarbonEvent gets sent when?
If you want to see the Carbon Events that are sent to your app at runtime (on Mac OS X), you can issue the following commands via Terminal:

% setenv EventDebug 1
% LaunchCFMApp <pathToYourApplication> | grep -v "kEventMouseDown"
The "grep -v" is for events you don't want to see.
the LaunchCFM bit is, of course, only used if your app is PEF.

you can also install Carbon event handlers on whichever events you're interested in, have the handler print the events out somewhere, and then let the event "fall through". this will work even if your app is WNE-based. have your handler return kEventNotHandledErr and the event will show up in your poll loop as it always has.

was this sort of what you had in mind?
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:37 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2