Re: NSTask
Re: NSTask
- Subject: Re: NSTask
- From: Phill Kelley <email@hidden>
- Date: Tue, 07 Oct 2003 18:22:20 +1000
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.
References: | |
| >NSTask (From: April Gendill <email@hidden>) |