NSBundle now...
NSBundle now...
- Subject: NSBundle now...
- From: Rhon Fitzwater <email@hidden>
- Date: Tue, 14 Jan 2003 15:51:53 -0500
I added the perl script to the resources folder in project
builder(main.pl) and made sure it was checked. And here is a snippet of
the code that I have:
NSTask * task = [[NSTask alloc] init];
int status = -999; // return status
NSDictionary * environ = [[NSProcessInfo processInfo]
environment];
NSString * username = [environ objectForKey:@"USER"];
NSString *path = [[NSBundle mainBundle] pathForResource:@"main"
ofType:@"pl"];
if (username)
{
NSLog(@"This is the path: ",path);
[task setLaunchPath:[NSString stringWithString:path]];
[task launch];
[task waitUntilExit];
status = [task terminationStatus];
}
In the console.log after running the program I get this:
"This is the path: "
&
"[NSPlaceholderString initWithString:]: nil string (or other) argument"
So basically this is telling me that the path variable is empty. But
why? Am I setting something wrong?
-Rhon
_______________________________________________
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.