• 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: Knowing when application terminates...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Knowing when application terminates...


  • Subject: Re: Knowing when application terminates...
  • From: Michael McCracken <email@hidden>
  • Date: Thu, 18 Jul 2002 14:33:33 -0700

Maybe i'm missing something, but if this is really all you're going to use your APP_IS_NOT_RUNNING test for, then you don't actually need it at all:

NSWorkspace's launchApplication: method had this line in its docs:
"...Returns YES if the application is successfully launched or already running, and NO if it can't be launched."

so, if you just want to avoid launching two copies of it, don't worry - just go right ahead. It will not start a second copy.

this documentation was at:
http://developer.apple.com/techpubs/macosx/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/NSWorkspace.html

cheers,
mike

I looked all over the documentation and can not find anything
that does what I want. What I have is a timer that fires every
few seconds that will check to see if a specific application is
open, if not it will open it, here is the basic structure of what
I am needing:

if ( APP IS NOT RUNNING ) {
[[NSWorkspace sharedWorkspace] launchApplication: @"APP NAME"];
}
--
Michael McCracken
email@hidden
http://www.cs.ucsd.edu/~mmccrack/bibdesk.html
http://radio.weblogs.com/0101358
_______________________________________________
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: Knowing when application terminates...
      • From: David Remahl <email@hidden>
  • Prev by Date: setShowsInvisibleCharacters
  • Next by Date: Re: Login App
  • Previous by thread: Re: Knowing when application terminates...
  • Next by thread: Re: Knowing when application terminates...
  • Index(es):
    • Date
    • Thread