RE: NSUserDefaults question
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.