Re: NSTask Path
Re: NSTask Path
- Subject: Re: NSTask Path
- From: "Todd de Gruyl" <email@hidden>
- Date: Tue, 14 Jan 2003 13:35:14 -0500
- Organization: Magnoliophyte
From: Rhon Fitzwater <email@hidden>
>
[task setArguments:[NSArray arrayWithObject:[NSString
>
stringWithString:@"Contents/Resources/main.pl"]]];
>
>
Above is what isnt working with my program. Does anyone know what path
>
I need to get my perl script to run. I have it so that when the
>
program is build the script is copied to the Resources folder inside
>
the package. But with the path I have above I get this error in the
>
console:
>
Can't open perl script "Contents/Resources/main.pl": No such file or
>
directory
>
>
What path do I need to add to the code above?
what you are probably looking for is [[NSBundle
mainBundle]pathForResource:@"main" ofType:@"pl"]];
The reason what you are trying didn't work is that applications are run from
"/", not from the application bundle.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: | |
| >NSTask Path (From: Rhon Fitzwater <email@hidden>) |