On Fri, 30 Jan 2009 15:44:03 -0800, Seth Willits <sli...@araelium.com> said:
>
>Does anyone have any experience with getting the previously front
>process? I tried using GetFrontProcess in applicationWillBecomeActive,
>but by that time my app is front. Getting front in
>applicationDidResignActive returns the app that was just activated
>after mine, but I need to know the active one right before I activate,
>not after I deactivate.

One possible approach:

<http://www.cocoabuilder.com/archive/message/cocoa/2006/7/9/167174>

(I've already posted my code for doing this, so check the archives.) Since
you will be notified every time a different app comes to the front, you can
just keep track - when your app comes to the front, the one you *previously*
recorded as being in front is the one you're after. (It may, of course, have
now terminated.)

m.

-- 
matt neuburg, phd = m...@tidbits.com, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
One of the 2007 MacTech Top 25: <http://tinyurl.com/2rh4pf>
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to