Re: NSTask
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.
References: | |
| >Re: NSTask (From: Phill Kelley <email@hidden>) |