Re: Task create failed error for NSTask
Re: Task create failed error for NSTask
- Subject: Re: Task create failed error for NSTask
- From: Ondra Cada <email@hidden>
- Date: Thu, 15 Nov 2001 21:50:07 +0100
Fei,
>
>>>>> Fei Li (FL) wrote at Thu, 15 Nov 2001 13:25:00 -0700:
FL> I tried to launch a application named "abc.app" use NSTask, I write code
FL> as follows:
FL> NSArray * args = [[NSArray alloc] initWithObjects:@"2", nil];
FL> [NSTask launchedTaskWithLaunchPath:@"/Users/feil/Desktop/abc.app"
FL> arguments:args];
FL>
FL> I always get error message:Task create for path abc.app failed.
FL>
FL> I think maybe I should change current directory for the NSTask...
Nope. You should give NSTask the executable path, though. The .app is just a
wrapper folder; the actual executable is hidden inside.
@"/Users/feil/Desktop/abc.app/Contents/MacOS/abc" should help.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc