• 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: Finlay Dobbie <email@hidden>
  • Date: Tue, 13 Sep 2005 17:46:04 +0100

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:launchIdentifier:
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
 _______________________________________________
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: "Theodore H. Smith" <email@hidden>
References: 
 >Launching another process, and knowing when it's loaded? (From: "Theodore H. Smith" <email@hidden>)

  • Prev by Date: Re: OT: porting PC to Mac - possible market?
  • Next by Date: Re: ScrollView change notification
  • 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