• 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: NSUserDefaults question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: NSUserDefaults question


  • Subject: RE: NSUserDefaults question
  • From: "Jonathan E. Jackel" <email@hidden>
  • Date: Fri, 7 Jun 2002 12:33:43 -0400

Indeed, the "recommended" way, according to both Hillegass and Garfinkel &
Mahoney, is to register the defaults for a class in the class's +initialize
method. Messing with main() seems like not a very "Cocoa" way to do it,
though obviously it does work.

Jonathan

> -----Original Message-----
> From: email@hidden
> [mailto:email@hidden]On Behalf Of jerome LAURENS
> Sent: Friday, June 07, 2002 7:50 AM
> To: John Anderson
> Cc: cocoa
> Subject: Re: NSUserDefaults question
>
>
> Le vendredi 7 juin 2002, ` 02:22 AM, John Anderson a icrit :
>
> > I think what you want to use here is standardUserDefaults. Make sure
> > you have an identifier set in your bundle settings. You'll typically
> > want to initialize your defaults in the main() function of your
> > application, before any classes get loaded. For example, this is the
> > main() function of my application (Presence):
> >
> >
>
> as documented in the apple doc, defaults defaults should be registered
> in the +(void)initialize method
>
> a first glance this is more... OOP, each class only declares the
> defaults that it needs
> _______________________________________________
> 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.
_______________________________________________
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: NSUserDefaults question (From: jerome LAURENS <email@hidden>)

  • Prev by Date: Re: About the accessibility stuff...
  • Next by Date: Re: Is there a setting in and application bundle so icon will not show in taskbar.
  • Previous by thread: Re: NSUserDefaults question
  • Next by thread: Accessor Generators
  • Index(es):
    • Date
    • Thread