• 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: How do I save an array in plist?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I save an array in plist?


  • Subject: Re: How do I save an array in plist?
  • From: Shane Stanley <email@hidden>
  • Date: Fri, 30 Nov 2012 13:51:24 +1100

On 30/11/2012, at 2:03 PM, Brian Christmas <email@hidden> wrote:

tell current application's NSUserDefaults to set defaults to standardUserDefaults()
        set messagesToptext to current application's NSMutableArray's array()
        my messagesToptext's addObject_({theGraphClient:"Email list"})
        tell defaults to registerDefaults_({SaveLocalftpArchiveOnServer:true,messagesTop:messagesToptext}) # this doesn't work

If you want to use an array in an AppleScript record like that, you'll need to coerce it to a list first. But in this case you might as well start with a list:

tell current application's NSUserDefaults to set defaults to standardUserDefaults()
        tell defaults to registerDefaults_({SaveLocalftpArchiveOnServer:true,messagesTop:{{theGraphClient:"Email list"}}}) # this doesn't work


-- 
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: How do I save an array in plist?
      • From: Brian Christmas <email@hidden>
    • Re: How do I save an array in plist?
      • From: Brian Christmas <email@hidden>
References: 
 >How do I save an array in plist? (From: Brian Christmas <email@hidden>)

  • Prev by Date: Need help calling a script from within a script based on text entry
  • Next by Date: Re: How do I save an array in plist?
  • Previous by thread: How do I save an array in plist?
  • Next by thread: Re: How do I save an array in plist?
  • Index(es):
    • Date
    • Thread