• 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
NSBundle now...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: NSBundle now...
      • From: mathew <email@hidden>
  • Prev by Date: Quick NSWorkspace question
  • Next by Date: Re: COM on mac
  • Previous by thread: Quick NSWorkspace question
  • Next by thread: Re: NSBundle now...
  • Index(es):
    • Date
    • Thread