Re: launchApplication
Re: launchApplication
- Subject: Re: launchApplication
- From: Andreas Monitzer <email@hidden>
- Date: Wed, 21 Nov 2001 20:47:40 +0100
On Wednesday, November 21, 2001, at 07:57 , Gerriet M. Denkmann wrote:
When I do:
[[NSWorkspace sharedWorkspace] launchApplication: @"OtherApp" ];
followed by:
[NSConnection rootProxyForConnectionWithRegisteredName:@"OtherApp"
host: nil ]
this will not work, if MyApp is not already running.
Obviously launchApplication returns immediately without waiting for
MyApp to complete launching.
Then I tried:
[ [NSWorkspace sharedWorkspace ] notificationCenter] addObserver
..NSWorkspaceDidLaunchApplicationNotification object: nil]
but this send a message, when this app finished launching, but nothing
after launching of OtherApp.
What to do? How do I find out if and when OtherApp is ready to open a
connection?
Use a distributed notification for informing the calling process when
OtherApp is ready (-> NSDistributedNotificationCenter).
andy