Skip navigation.
 
mlNSBundle now...
FROM : Rhon Fitzwater
DATE : Tue Jan 14 21:51:53 2003

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_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
mlNSBundle now... Rhon Fitzwater Jan 14, 21:51
mlRe: NSBundle now... mathew Jan 15, 01:54
mlRe: NSBundle now... Vince DeMarco Jan 15, 17:04