Open Menu
Close Menu
Apple
Shopping Bag
Apple
Mac
iPad
iPhone
Watch
TV
Music
Support
Search apple.com
Shopping Bag
Lists
Open Menu
Close Menu
Terms and Conditions
Lists hosted on this site
Email the Postmaster
Tips for posting to public mailing lists
Using UserDefaults properly
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
Using UserDefaults properly
Subject
:
Using UserDefaults properly
From: "Keith Penrod" <
email@hidden
>
Date: Fri, 08 Sep 2006 21:23:05 -0600
I'm writing a basic program to keep track of your budget, and as part of that I want to have a list of categories (like Car expenses, Groceries, etc.) that the user can define and modify. But, since the user wouldn't want to re-enter this list of categories each time a new document is created, I would like to store the list of categories somewhere "shared." What I have done--that works--is just store an NSDictionary with the information in the standardUserDefaults, using NSUserDefaults. However, since this isn't technically a "prefence" kind of thing, I don't think that's where I should store it. Would there be a better way? I mean, I wouldn't want to create a file that's outside of the packaged app, since the user might see it and delete it, thinking it's an erroneous file. Is there a way to save to a file and make sure that it's either invisible to the user or inside the package with the app?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Follow-Ups
:
Re: Using UserDefaults properly
From:
Andrew Merenbach <email@hidden>
Re: Using UserDefaults properly
From:
Ryan Britton <email@hidden>
Prev by Date:
Re: How do I get the NSApplication of other running applications?
Next by Date:
Re: Using UserDefaults properly
Previous by thread:
Re: Master-Detail interfaces, Multiple Documents, and floating windows
Next by thread:
Re: Using UserDefaults properly
Index(es):
Date
Thread