Re: Determining Previous Front Process

2009-01-30 Thread Matt Neuburg
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


Re: Determining Previous Front Process

2009-01-30 Thread Seth Willits

On Jan 30, 2009, at 5:48 PM, Matt Neuburg wrote:


One possible approach:

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


This'll work great. Thanks.



(I've already posted my code for doing this, so check the archives.)


Searching the archives is such a PITA. The search algorithm is lame.  
Searching for GetFrontProcess and Neuburg, for example, should  
*surely* show this thread at the top. Does it? No. It's not even  
anywhere in the top 100 results. What kind of search is that?



--
Seth Willits



___

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


Re: Determining Previous Front Process

2009-01-30 Thread Rob Keniger


On 31/01/2009, at 12:00 PM, Seth Willits wrote:

Searching the archives is such a PITA. The search algorithm is lame.  
Searching for GetFrontProcess and Neuburg, for example, should  
*surely* show this thread at the top. Does it? No. It's not even  
anywhere in the top 100 results. What kind of search is that?



Use the advanced search and change the search type to All of the  
words. One result.


--
Rob Keniger



___

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


Re: Determining Previous Front Process

2009-01-30 Thread Martin Wierschin

On 2009.01.30, at 6:04 PM, Rob Keniger wrote:


On 31/01/2009, at 12:00 PM, Seth Willits wrote:

Searching the archives is such a PITA. The search algorithm is  
lame. Searching for GetFrontProcess and Neuburg, for example,  
should *surely* show this thread at the top. Does it? No. It's not  
even anywhere in the top 100 results. What kind of search is that?


Use the advanced search and change the search type to All of the  
words. One result.


Typing GetFrontProcess AND Neuburg into the normal search field  
will do the same. Having a disjunctive search is a silly default IMO.


~Martin

___

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


Re: Determining Previous Front Process

2009-01-30 Thread Michael Ash
On Fri, Jan 30, 2009 at 9:00 PM, Seth Willits sli...@araelium.com wrote:
 On Jan 30, 2009, at 5:48 PM, Matt Neuburg wrote:

 One possible approach:

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

 This'll work great. Thanks.


 (I've already posted my code for doing this, so check the archives.)

 Searching the archives is such a PITA. The search algorithm is lame.
 Searching for GetFrontProcess and Neuburg, for example, should *surely*
 show this thread at the top. Does it? No. It's not even anywhere in the top
 100 results. What kind of search is that?

Use the google! My rule is never to use a site's search unless it
blocks google somehow. The list archives are much better searched
using site:cocoabuilder.com (or site:lists.apple.com) than trying
to make the built-in search functionality produce worthwhile results.

Mike
___

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


Re: Determining Previous Front Process

2009-01-30 Thread Andy Lee

On Jan 31, 2009, at 12:22 AM, Michael Ash wrote:

Use the google! My rule is never to use a site's search unless it
blocks google somehow. The list archives are much better searched
using site:cocoabuilder.com (or site:lists.apple.com) than trying
to make the built-in search functionality produce worthwhile results.


And for general search, when I don't like the relevancy ranking in  
Xcode's doc window, I find Googling with site:developer.apple.com can  
be very helpful.


--Andy


___

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