• 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: Task create failed error for NSTask
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Task create failed error for NSTask (From: Fei Li <email@hidden>)

  • Prev by Date: Re: Table view with widgets inside
  • Next by Date: Re: Table view with widgets inside
  • Previous by thread: Task create failed error for NSTask
  • Next by thread: Re: Task create failed error for NSTask
  • Index(es):
    • Date
    • Thread