• 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: Activate app but bring only *one* window to the front
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Activate app but bring only *one* window to the front


  • Subject: Re: Activate app but bring only *one* window to the front
  • From: Ken Thomases <email@hidden>
  • Date: Thu, 30 Jun 2011 20:15:27 -0500

On Jun 30, 2011, at 3:39 PM, Jerry Krinock wrote:

> On 2011 Jun 29, at 10:11, Kyle Sluder wrote:
>
>> -[NSRunningApplication activateWithOptions:]
>
> Thank you, Kyle, that works.  Indeed, in Mac OS 10.6+, the code
>
> [[NSRunningApplication currentApplication] activateWithOptions:NSApplicationActivateIgnoringOtherApps] ;
>
> activates the app, but only brings forward the key/main window(s), as desired.  (My actual code is longer since this app uses the 10.5 SDK.  10.5 users will get all windows activated.)

For what it's worth, that new method is simply the Cocoa equivalent of SetFrontProcessWithOptions with kSetFrontProcessFrontWindowOnly.  So, you can use the latter for 10.5 compatibility.

Regards,
Ken

_______________________________________________

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

References: 
 >Activate app but bring only *one* window to the front (From: Jerry Krinock <email@hidden>)
 >Re: Activate app but bring only *one* window to the front (From: Kyle Sluder <email@hidden>)
 >Re: Activate app but bring only *one* window to the front (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Modify metadata of existing file using AVFoundation
  • Next by Date: Re: dealloc and scarce resources
  • Previous by thread: Re: Activate app but bring only *one* window to the front
  • Next by thread: Display Letterboxing Pillarboxing
  • Index(es):
    • Date
    • Thread