• 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
Serious alternative to NSWorkspaceDidLaunchApplicationNotification?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Serious alternative to NSWorkspaceDidLaunchApplicationNotification?


  • Subject: Serious alternative to NSWorkspaceDidLaunchApplicationNotification?
  • From: Matt Gemmell <email@hidden>
  • Date: Sun, 26 May 2002 20:42:48 +0100

Hi again all,

More about NSWorkspaceDidLaunchApplicationNotification, only this time
I'm looking for an alternative that's actually useful(!)

Since that notification only passes the app's name (and a questionable
version of the name at that; see my previous message), it's of very
little use in determining which actual application has been launched.
The only method which seems at all useful in this context is
NSWorkspace's -fullPathForApplication:, and that falls down if you have
more than one app with the same name installed (like both a Classic and
native version of a web browser, for example).

I need something a bit more serious. Does anything exist in Cocoa to
provide some kind of useful notification about just *which* app has been
launched?

I already have code which uses the Carbon Process Manager to get an
NSArray of NSStrings containing the full paths to all running apps (I
use this when my app launches, to check whether any of the apps it's
keeping track of are already running). I can just loop through that when
I received the notifications, I suppose.

I'd just much rather there was some nice Cocoa functionality. The idea
of returning just an app's *name* for that notification seems like a bit
of a joke. I can't even think of a situation where I'd need just the
name. Come on, there *must* be some bulletproof way of using that name
to find which app was launched/terminated - someone tell me! :)

Best,
-Matt

--
Matt Gemmell
Scotland Software
<http://www.scotlandsoftware.com/>
_______________________________________________
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.

  • Prev by Date: Re: Small sockets, Autorelease etc...
  • Next by Date: Text extracts, .webloc & NSTextView
  • Previous by thread: Re: Small sockets, Autorelease etc...
  • Next by thread: Text extracts, .webloc & NSTextView
  • Index(es):
    • Date
    • Thread