• 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
Re: NSTask launchpath - space
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTask launchpath - space


  • Subject: Re: NSTask launchpath - space
  • From: zauhar <email@hidden>
  • Date: Sun, 5 Oct 2003 16:37:29 -0400

Hi David,

I don't know if this provides a clue - one of my applications includes
this code:

path = [ [ NSBundle mainBundle ]
pathForAuxiliaryExecutable:@"make_triangle_propLists" ] ;

outPipe = [ NSPipe pipe ] ;
outHandle = [ outPipe fileHandleForReading ] ;

makePropLists = [ [ NSTask alloc ] init ] ;
[ makePropLists setLaunchPath:path ] ;

Initially, the path did NOT include a space, but I have changed the
name of the directory to include a space and rebuilt the application.
NOW it works if I simply run the application, but the launch fails if I
run in debug mode!

Curiously, I check for the termination status:

if( [ makePropLists terminationStatus ] > 0 )
{
int choice = NSRunAlertPanel( @"Import molsurf
File...", @"Property list generation failed! - So sorry...", @"Exit",
nil, nil ) ;

[ [ NSApplication sharedApplication ] terminate:self ] ;
}


I get no error message when debugging - the external app simply doesn't
start. Really weird.

Randy


On Sunday, October 5, 2003, at 02:31 PM, David Dauer wrote:

> Hello
>
> How can I make NSTask's setLaunchPath accepting paths with spaces?
> [theTask setLaunchPath:@"/Volumes/My Mac/usr/tool"]; //won't work!
>
> Any suggestion?
> David
> _______________________________________________
> 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.
>
>

Randy J. Zauhar, PhD
Assoc. Prof. of Biochemistry
Director, Graduate Program in Bioinformatics
Dept. of Chemistry & Biochemistry
University of the Sciences in Philadelphia
600 S. 43rd Street
Philadelphia, PA 19104

Phone: (215)596-8691
FAX: (215)596-8543
E-mail: email@hidden
Web: http://tonga.usip.edu/zauhar


Discussion after watching Disney's "Lilo & Stitch":

DAD: "But why did the space aliens speak English, as opposed to French,
or Swahili? And why did the one alien speak English with an Eastern
European accent? I don't get it."

CATHERINE (age 7): "That's 'cause you don't have a good cartoon brain."
_______________________________________________
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 launchpath - space (From: David Dauer <email@hidden>)

  • Prev by Date: Re: Software Incompatibilities - Please Help!
  • Next by Date: Re: NSTask launchpath - space
  • Previous by thread: NSTask launchpath - space
  • Next by thread: Re: NSTask launchpath - space
  • Index(es):
    • Date
    • Thread