• 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: [Semi-OT] "defaults write" for arrays?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Semi-OT] "defaults write" for arrays?


  • Subject: Re: [Semi-OT] "defaults write" for arrays?
  • From: Piers Uso Walter <email@hidden>
  • Date: Sun, 26 May 2002 22:51:19 +0200

Am Sonntag den, 26. Mai 2002, um 22:41, schrieb Matt Gemmell:

During development, I often have the need to alter the saved defaults
for my apps, sometimes before I have a UI to do so. I tend to just
change the saved defaults via the Terminal, using "defaults write...".
However, I can't seem to get it to work for an array of NSStrings.

Say I have a default whose key is MyArrayKey, and my app's domain is
com.my.app. Ideally, I'd like to be able to do something like this:

defaults write com.my.app MyArrayKey "String 1","String 2","String 3"

or

defaults write com.my.app MyArrayKey {"String 1","String 2","String 3"}

But that syntax doesn't work. Is it possible to change defaults which
are NSArrays of NSStrings via the command line, and if so, what's the
correct syntax?

defaults write com.my.app MyArrayKey ("String 1","String 2","String 3")

With kind regards

Piers

--
Piers Uso Walter <email@hidden>
ilink Kommunikationssysteme GmbH
_______________________________________________
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: [Semi-OT] "defaults write" for arrays?
      • From: Piers Uso Walter <email@hidden>
    • Re: [Semi-OT] "defaults write" for arrays?
      • From: Ondra Cada <email@hidden>
  • Prev by Date: [Semi-OT] "defaults write" for arrays?
  • Next by Date: Re: [Semi-OT] "defaults write" for arrays?
  • Previous by thread: Re: [Semi-OT] "defaults write" for arrays?
  • Next by thread: Re: [Semi-OT] "defaults write" for arrays?
  • Index(es):
    • Date
    • Thread