• 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
Re: Why use PreferencePanes.framework?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why use PreferencePanes.framework?


  • Subject: Re: Why use PreferencePanes.framework?
  • From: Alex Rice <email@hidden>
  • Date: Wed, 26 Jun 2002 15:08:06 -0600

On Wednesday, June 26, 2002, at 02:48 PM, Andreas Monitzer wrote:


Don't know what you're talking about. DigiTunnel (see .sig) uses NSUserDefaults.

I was talking about this narrative from the cocoa docs. It makes it sound as if one must use CFPreferences:

from "Managing User Preferences":

"The NSUserDefaults class, which is part of the Cocoa Foundation framework, is used by Cocoa applications to manage their user preferences. Because it writes preferences to the second domain listed in Table 1, using the "Current" application domain, it cannot be used by a preference pane within a preference application. It would write any changed preferences to the preference application's preference file, instead of to the target application's file. If the preference pane is embedded in the target application, NSUserDefaults works, but it then breaks the modular and reusable design of the preference pane."


Take a look at this:
http://www.cocoadevcentral.com/tutorials/showpage.php?show=00000035.php


OK, this answers my question. Thanks i wasn't aware of the tutorial. I knew there must be a way to make NSUserDefaults do it!

NSDictionary *prefs=[[NSUserDefaults standardUserDefaults]
persistentDomainForName:[[NSBundle bundleForClass:[self class]]
bundleIdentifier]];

Alex Rice <email@hidden>
Mindlube Software
http://www.mindlube.com/
_______________________________________________
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.

References: 
 >Re: Why use PreferencePanes.framework? (From: Andreas Monitzer <email@hidden>)

  • Prev by Date: Re: How to write an Menu Extra
  • Next by Date: Re: Why use PreferencePanes.framework?
  • Previous by thread: Re: Why use PreferencePanes.framework?
  • Next by thread: Re: Why use PreferencePanes.framework?
  • Index(es):
    • Date
    • Thread