Just a small short question: is it possible to save a list in a default entry? Because I’ve tried it, but I couldn’t make it work.
Thanks in advance,
ief2
PS.: I’m sorry for my English. I know I sometimes make some rubbish sentences, but I ask you to forgive me. I’m only 14 years old and I come from Belgium, so I speak dutch. If you don’t understand me, don’t hesitate to give a reply on that.
of course, you can save text, numbers, data, lists, records, dates according the ObjC classes NSString, NSNumber, NSData, NSArray, NSDictionary, NSDate
for example
property myList : {}
on register_Preferences()
tell user defaults
make new default entry at end of default entries with properties {name:"myList", contents:{}}
register
end tell
end register_Preferences
on read_Preferences()
try
tell user defaults
set myList to contents of default entry "myList"
end tell
end try
end read_Preferences
on save_Preferences()
try
tell user defaults
set contents of default entry "myList" to myList
end tell
call method "synchronize" of object user defaults
end try
end save_Preferences