Re: Notification of Front Process Changed ?
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.