• 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: Notification of Front Process Changed ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Notification of Front Process Changed ?


  • Subject: Re: Notification of Front Process Changed ?
  • From: "Vince DeMarco <Vince DeMarco" <email@hidden>
  • Date: Wed, 27 Aug 2003 14:35:02 -0700

On Aug 27, 2003, at 1:54 PM, Jim Correia wrote:

On Wednesday, August 27, 2003, at 04:23 PM, Scott Anguish wrote:

Well, you could poll NSWorkspaces activeApplication, but that's also rather bad. :-)

On shipping versions of the OS (all Mac OS X flavors IIRC) you can get this information via Carbon Events.

I've successfully used them in a Carbon application. I have not attempted to use them in a Cocoa application.


Or you can register for a notification from workspace

NSWorkspaceDidLaunchApplicationNotification
NSWorkspaceWillLaunchApplicationNotification

be sure to get the NotificationCenter from NSWorkspace though.

- (NSNotificationCenter *)notificationCenter;


and register with that one not the default one.

vince
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Notification of Front Process Changed ?
      • From: Hsu <email@hidden>
    • Re: Notification of Front Process Changed ?
      • From: Scott Anguish <email@hidden>
References: 
 >Re: Notification of Front Process Changed ? (From: Jim Correia <email@hidden>)

  • Prev by Date: Re: Notification of Front Process Changed ?
  • Next by Date: How to load a sheet in a separate Nib file
  • Previous by thread: Re: Notification of Front Process Changed ?
  • Next by thread: Re: Notification of Front Process Changed ?
  • Index(es):
    • Date
    • Thread