• 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 is Weird
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTask is Weird


  • Subject: Re: NSTask is Weird
  • From: "J. Todd Slack" <email@hidden>
  • Date: Thu, 11 Sep 2008 11:22:15 -0700


Thanks everyone, Yes, over thinking about it. I was escaping and quoting, etc.


Works now!

-Jason

On Sep 11, 2008, at 8:48 AM, Clark Cox wrote:

On Thu, Sep 11, 2008 at 4:03 AM, J. Todd Slack
<email@hidden> wrote:
Hi,

I guess what I dont get is when you pass arguments that are not simple like:

[task setLaunchPath: @"/bin/ls"];
[task setArguments: [NSArray arrayWithObjects: @"ls", @"- al", @"/",
nil]];

What about a command that takes arguments like:

--segments /Users/slack/music/iTunes/iTunes Music/amber, 00:00:10,00:00:35
/user/slack/music/itunes/itunes music/01 amber.mp3


Where:

' --segments' is an argument

'/Users/slack/music/iTunes/iTunes Music/amber,00:00:10,00:00:35' is really
one argument I build up from pieces and has spaces in path


'/user/slack/music/itunes/itunes music/01 amber.mp3' is another argument
with spaces in path, etc

You're over-thinking it. There is no shell involved, so spaces don't matter:


[task setArguments: [NSArray arrayWithObjects: @"--segments",
@"/Users/slack/music/iTunes/iTunes Music/amber,00:00:10,00:00:35",
@"/user/slack/music/itunes/itunes music/01 amber.mp3", nil]];




-Jason

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden




-- Clark S. Cox III email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >NSTask is Weird (From: "J. Todd Slack" <email@hidden>)
 >Re: NSTask is Weird (From: Andrew Farmer <email@hidden>)
 >Re: NSTask is Weird (From: Jim Correia <email@hidden>)
 >Re: NSTask is Weird (From: "J. Todd Slack" <email@hidden>)
 >Re: NSTask is Weird (From: "Clark Cox" <email@hidden>)

  • Prev by Date: Re: How do I identify Myself within AddressBook Progammatically?
  • Next by Date: Re: NSArrayController fetchPredicate behaving badly
  • Previous by thread: Re: NSTask is Weird
  • Next by thread: How to locate error that occurs while the nib is loading
  • Index(es):
    • Date
    • Thread