Re: Launch with bundle fails the first time
Re: Launch with bundle fails the first time
- Subject: Re: Launch with bundle fails the first time
- From: Nir Soffer <email@hidden>
- Date: Sat, 9 Dec 2006 20:10:09 +0200
On Dec 8, 2006, at 13:29, Trygve Inda wrote:
Have you tried launching your subapp with -launchApplication:?
sherm--
Yes, but I lose the ability to add extra parameters:
How about launching the executable itself with NSTask and passing
parameters in the arguments?
NSString *helperPath = [[NSBundle mainBundle]
pathForResource:@"Helper"
ofType:@"app"];
NSBundle *helperBundle = [NSBundle bundleWithPath: helperPath];
[NSTask launchedTaskWithLaunchPath:[helperBundle executablePath]
arguments:[NSArray arrayWithObjects:...]];
Since you control the helper app, relying on its name is good enough.
Also, you don't want launch services to locate another copy with the
wrong version, you want the copy inside the current bundle.
Best Regards,
Nir Soffer
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden