• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Determining Previous Front Process
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determining Previous Front Process


  • Subject: Re: Determining Previous Front Process
  • From: Matt Neuburg <email@hidden>
  • Date: Fri, 30 Jan 2009 17:48:56 -0800
  • Thread-topic: Determining Previous Front Process

On Fri, 30 Jan 2009 15:44:03 -0800, Seth Willits <email@hidden> 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 = email@hidden, <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 (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Determining Previous Front Process
      • From: Seth Willits <email@hidden>
  • Prev by Date: Re: Serial IO seems to be starving UI
  • Next by Date: Re: Issues with Inheritance and collections?
  • Previous by thread: Determining Previous Front Process
  • Next by thread: Re: Determining Previous Front Process
  • Index(es):
    • Date
    • Thread