Hi All,
Have been in ObjC land for a while - getting back to ASOC and stuck on writeToFile
I have an array controller which is bound to two tables with a AS record for the data. This all works fine.
There’s an array element called “zipfiles”
I made a list of records from a file list:
set modDatesList to {}
repeat with i from 1 to count of completeFileList
set thisFile to item i of completeFileList as string
set thisSize to size of (info for (thisFile as POSIX file))
copy {localFile:thisFile,fileSize:thisSize} to end of modDatesList
end repeat
and then
set thisMut to NSMutableArray's alloc()'s init()
thisMut's addObjectsFromArray_(Backupset's arrangedObjects())
set thisObj to thisMut's objectAtIndex_(0)
thisObj's setValue_forKey_(modDatesList, "zipfiles")
thisMut's writeToFile_atomically_(FILE_PATH, true)
I won’t write the updated array with the the list records to plist
If I pass it a simple
set modDatesList to [{"A","B","C"},{"1","2","3"}}
it works but oddly not all the time. I check the plist and it doesn’t get updated, only sometimes. No errors reported. A bit perplexed why this isn’t a simple matter. Well, it probably is. Any thoughts appreciated.
Thanks, Rob