• 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: Launching another process, and knowing when it's loaded?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Launching another process, and knowing when it's loaded?


  • Subject: Re: Launching another process, and knowing when it's loaded?
  • From: "Theodore H. Smith" <email@hidden>
  • Date: Tue, 13 Sep 2005 20:00:51 +0100


Thanks, I'll give launchAppWithBundleIdentifier:options:additionalEventParamDescriptor:lau nchIdentifier: a go!


On 13 Sep 2005, at 17:46, Finlay Dobbie wrote:

On 13/09/05, Theodore H. Smith <email@hidden> wrote:

Using NSWorkspace to launch an auxiliary process, I am finding it
hard to reliably tell when the process has actually opened, and then
tell when it's actually closed.


Are you not getting NSWorkspaceDidLaunchApplicationNotification and NSWorkspaceDidTerminateApplicationNotification?


[ws launchApplication:kAppPath showIcon:NO autolaunch:NO];
// is the app open by the time my code gets here, or not?
bool b = CheckIfAppExists();


No, probably not. Apps are launched asynchronously by default. If you
don't want them to launch asynchronously, then you'll have to use the
launchAppWithBundleIdentifier:options:additionalEventParamDescriptor:l aunchIdentifier:
method (which provides more fine-grained control) on 10.3+ (or call
LaunchServices directly if you need Jaguar compatibility).



Can I assume that the app won't open and close by the time the
function has returned?


The app probably won't have even finished launching by the time the function has returned.

 -- Finlay





--
http://elfdata.com/plugin/

What does our work achieve, if it's not making the world a happier place?
http://www.whatnextjournal.co.uk/Pages/Next/Happiness.html
When's the last time you thought deeply about how to improve our lives?



_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Launching another process, and knowing when it's loaded?
      • From: Rosyna <email@hidden>
References: 
 >Launching another process, and knowing when it's loaded? (From: "Theodore H. Smith" <email@hidden>)
 >Re: Launching another process, and knowing when it's loaded? (From: Finlay Dobbie <email@hidden>)

  • Prev by Date: does NSMenuItem setMixedStateImage or setOnStateImage work?
  • Next by Date: Transparent window
  • Previous by thread: Re: Launching another process, and knowing when it's loaded?
  • Next by thread: Re: Launching another process, and knowing when it's loaded?
  • Index(es):
    • Date
    • Thread