• 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
Setting a blank ("") argument in NSTask
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting a blank ("") argument in NSTask


  • Subject: Setting a blank ("") argument in NSTask
  • From: Ben Borofka <email@hidden>
  • Date: Sun, 24 Apr 2005 16:22:14 -0700

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

  • Follow-Ups:
    • Re: Setting a blank ("") argument in NSTask
      • From: p3consulting <email@hidden>
    • Re: Setting a blank ("") argument in NSTask
      • From: Jonathon Mah <email@hidden>
  • Prev by Date: Re: Conceptual help with CFMessagePort/NSMessagePort
  • Next by Date: Re: Hiding Rows in NSTableView
  • Previous by thread: Re: Conceptual help with CFMessagePort/NSMessagePort
  • Next by thread: Re: Setting a blank ("") argument in NSTask
  • Index(es):
    • Date
    • Thread