Preferences (user defaults) in Applescript Studio
Preferences (user defaults) in Applescript Studio
- Subject: Preferences (user defaults) in Applescript Studio
- From: David Durkee <email@hidden>
- Date: Thu, 09 Dec 2004 12:28:07 -0600
Is it possible in Applescript Studio to add a list of dictionaries
(i.e. an array of records) under a key in user defaults? Every way I
have tried has resulted in errors at runtime. I'm trying to add data
that looks like this:
{
{
server: "Harriet",
volume: "Bugs"
},
{
server: "Calhoun",
volume: "Development"
}
}
Just trying to stuff that into user defaults under a single key fails.
I did find that I could add the data to the plist file using PList
Editor, and after I do so, I can see the data by running my application
and looking in the Explorer pane of the Dictionary Window of Script
Debugger. From that I was able to determine that I could read the
default entry with the code:
tell app "MyApp"
set x to content of default entry "appBugSampleServerInfo" of user
defaults
end tell
But I was unable to derive any way of modifying the data that worked.
Even modifying x and using the inverse:
set content of default entry "appBugSampleServerInfo" of user defaults
to x
failed.
Anyone know how to do this?
David
--
David Durkee
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden