User Defaults
User Defaults
- Subject: User Defaults
- From: Roland Silver <email@hidden>
- Date: Mon, 30 Apr 2007 20:22:05 -0600
My program has two menu items, call them "File..." and "File
Again" (Please leave aside the question of why I'm not using Open...
and Open Recent).
If the user chooses the former, he gets a window/panel allowing him
to select the file the app works on. If he chooses the latter, the
app works on the last file he selected.
So, in the former case, I save the file path string in
[NSUserDefaults standardUserDefaults], with key @"inFilePath", say.
In the latter case, I retrieve the file path string in
[NSUserDefaults standardUserDefaults].
So the set of user defaults must persist between one invocation of
the app to another, presumably stored in some file, somewhere. That
file doesn't appear to be the project's Info.plist, because there's
no occurrence of the string "inFilePath" there.
So where is it stashed? And do I have to do something to stash it
(and retrieve it when my app begins execution), or does that happen
automatically?
Although reading "User Defaults Programming Topics" should enlighten
me, I'm unable to form a mental picture of what's going on from
reading it.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden