Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

User Defaults



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.