Re: Reading several UserDefaults
Re: Reading several UserDefaults
- Subject: Re: Reading several UserDefaults
- From: "John C. Randolph" <email@hidden>
- Date: Tue, 19 Feb 2002 19:43:44 -0800
On Tuesday, February 19, 2002, at 02:40 PM, Taxxodium wrote:
Hi,
Is there a way to read the defaults of an other app?
Sure. Use NSUserDefaults' -persistentDomainForName: method. Be
very careful though about editing another app's defaults. (Like,
don't.)
I ask because I don't wanna have 2 apps that I wrote share the
same preferences file. In fact they can't share it since one of
them is a Preferences pane.
Actually, I see no reason why they can't share the domain.
There's nothing preventing your prefs pane from opening a
different defaults domain. At IllumineX, we shared user
registration info across our apps, by setting up a
"com.illuminex.registration" domain. (We may have called it
something different, but you get the idea.)
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.