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

Task create failed error for NSTask


  • Subject: Task create failed error for NSTask
  • From: Fei Li <email@hidden>
  • Date: Thu, 15 Nov 2001 13:25:00 -0700

Hello all,
I tried to launch a application named "abc.app" use NSTask, I write code
as follows:
NSArray * args = [[NSArray alloc] initWithObjects:@"2", nil];
[NSTask launchedTaskWithLaunchPath:@"/Users/feil/Desktop/abc.app"
arguments:args];

I always get error message:Task create for path abc.app failed.

I think maybe I should change current directory for the NSTask, so I
change my code to
NSArray * args = [[NSArray alloc] initWithObjects:@"2", nil];
NSTask * theTask = [[NSTask alloc] init];
[theTask setCurrentDirectoryPath:@"/Users/feil/Desktop/"];
[theTask setLaunchPath:@"abc.app"];
[theTask setArguments:args];
[theTask launch];
But I also get the same error.

Thanks for any help for helping me out!

Fei


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