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

Re: NSTask


  • Subject: Re: NSTask
  • From: April Gendill <email@hidden>
  • Date: Tue, 7 Oct 2003 07:51:21 -0700

yes I understand that, which is why i have an array, the problem is when I pass an argument like

-arg param

this is what doesn't work.

just an array of arguments works fine

April.
On Tuesday, October 7, 2003, at 01:22 AM, Phill Kelley wrote:

At 23:26 -0700 06/10/2003, April Gendill wrote:
Ok... Why doesn't NSTask work like the terminal?
According to what I have read you pass arguments to the task as array
elements. fine.. But why won't it accept ANY argument which requires a
parameter?
something like

Regular arguments -l or -a or something go just fine, but when it's
something like -l someparameter or -a parameter, I get an invalid
argument.
How am I able to pass an argument that needs a parameter through NSTask?

Ok... Why doesn't NSTask work like the terminal?
According to what I have read you pass arguments to the task as array
elements. fine.. But why won't it accept ANY argument which requires a
parameter?
something like

Regular arguments -l or -a or something go just fine, but when it's
something like -l someparameter or -a parameter, I get an invalid
argument.
How am I able to pass an argument that needs a parameter through NSTask?

April.

Hi April,

Each argument needs to be passed separately. For example:

NSTask* task = [[NSTask alloc] init];

NSMutableArray* taskArguments = [NSMutableArray array];

[taskArguments addObject:@"-l"];
[taskArguments addObject:@"someparameter"];

[task setArguments:taskArguments];
...


Regards, Phill
_______________________________________________
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.
_______________________________________________
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: NSTask
      • From: Shawn Erickson <email@hidden>
    • Re: NSTask
      • From: Alex Lock <email@hidden>
    • Re: NSTask
      • From: Chris Hanson <email@hidden>
    • Re: NSTask
      • From: Clark Cox <email@hidden>
    • Re: NSTask
      • From: Chris Ridd <email@hidden>
    • Re: NSTask
      • From: j o a r <email@hidden>
References: 
 >Re: NSTask (From: Phill Kelley <email@hidden>)

  • Prev by Date: [OT] Building a MachO internet plugin that works with Safari ?
  • Next by Date: mutable keys in NSMutableDictionary
  • Previous by thread: Re: NSTask
  • Next by thread: Re: NSTask
  • Index(es):
    • Date
    • Thread