Re: Setting a blank ("") argument in NSTask
Re: Setting a blank ("") argument in NSTask
- Subject: Re: Setting a blank ("") argument in NSTask
- From: p3consulting <email@hidden>
- Date: Mon, 25 Apr 2005 15:32:43 +0200
Try
@"\"\""
or
@"''"
Pascal Pochet
email@hidden
----------------------------------
PGP
KeyID: 0x208C5DBF
Fingerprint: 9BFB 245C 5BFE 7F1D 64B7 C473 ABB3 4E83 208C 5DBF
Le 25 avr., 2005, à 01:22, Ben Borofka a écrit :
I need to set a blank, empty argument (like "") in an NSTask, and I'm
not sure how to do this.
I'm trying to do this:
$ dscl . create /users/test blah "" // Create a netinfo property
with no value
I don't know how to set the "" in my NSTask arguments. NSTask is not
supposed to work with single or double quotes you have to type in the
command line. I've tried all sorts of things. I've tried putting an
empty NSString.
[dscl_13 setArguments:[NSArray arrayWithObjects:@".", @"create",
@"/users/test", @"blah", empty_string, nil]];
I've tried just putting nothing between quotes:
[dscl_13 setArguments:[NSArray arrayWithObjects:@".", @"create",
@"/users/test", @"blah", @"", nil]];
And nothing works. I get errors when I run the program. What can I put
in there to make it a blank argument in this case?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden