Re: NSUserDefaults
Re: NSUserDefaults
- Subject: Re: NSUserDefaults
- From: Ondra Cada <email@hidden>
- Date: Mon, 20 Mar 2006 09:14:28 +0100
Devraj,
On 20.3.2006, at 3:35, Devraj Mukherjee wrote:
Problem I have is I wish to share the Preferences across multiple
applications
To tha goal, you need to learn about persistent domains (NSUserDefaults)
and I have thus made the System Preferences handling in a
framework that all these applications share.
Here are some of the questions I have about my own method:
1. Is storing preferences using a framework a valid technique?
Quite, but it will not ensure sharing of prefs between different
application--the application domain is always private for an app (and
a user). To share a pref between more apps, it needs to be in an
extra named persistent domain.
2. Is there a message that has to be passed to the object that asks it
to store the informaiton?
Check NSKeyed(Un)Archiver. Note also you can very conveniently bind
directly to archived objects through NSUserDefaultsController using
appropriate value transformer.
3. Any examples, sources I can have a look at?
/Developer/Examples on your disk, perhaps? :) Anyway, until you need
to share prefs betwixt different users, this is pretty easy and Just
Works as documented.
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
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