You can do this (and a lot of other stuff not covered by NSWorkspace )
with a CarbonEvent handler on kEventClassApplication,
kEventAppFrontSwitched.
Matt
On 9 Jul 2008, at 5:44pm, Jens Alfke wrote:
On 9 Jul '08, at 3:22 AM, Александр Даровских wrote:
Hi,
Is there any way to subscribe to frontmost application change
notification? For example, via NSDistributedNotificationCenter or
some other facility? I have managed to get process startup and
shutdown notifications, but I cannot get active application change
notification. Maybe it is done in somehow another way?
I ran NotificationWatcher, which logs all distributed notifications
and workspace notifications, but didn't see anything when I switched
apps. So it must be done a different way. I suspect there may be a
CoreGraphics API that does this; try looking there.
—Jens_______________________________________________
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/matt.gough%40agfa.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
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 [EMAIL PROTECTED]