I'd like to be able to save an array to my projects preference file, but can't work out how to do it.
Could someone give me an example of how to go about it, please (or point me to a chapter of Shanes book, cause i can't find it there.)
on applicationWillFinishLaunching_(aNotification)
-- Insert code here to initialize your application before any files are opened
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
tell defaults to set SaveLocalftpArchiveOnServer to objectForKey_("SaveLocalftpArchiveOnServer")
tell defaults to set messagesTopText to objectForKey_("messagesTop")
set my messagesBottomtext to "Mail Manager is Running Normally"
tell windowMain to displayIfNeeded()
set my buttonStandbyFlag to false
my buttonStandby's setTitle_("Standby for " & theMinutesToStop & " minutes.")
my displayData()
my setftpButton()
my runMM()
end applicationWillFinishLaunching_