NSUserDefaults and custom classes
NSUserDefaults and custom classes
- Subject: NSUserDefaults and custom classes
- From: "Devraj Mukherjee" <email@hidden>
- Date: Sun, 15 Jul 2007 22:35:44 +1000
Hi everyone,
To store user defaults I have created an object that contains strings
and numbers as instances variables. I plan to write this object to the
as a user defaults object.
From a design perspective, should I have another class write and read
this object to the user defaults or is it OK to have the object write
and read itself from the user defaults space.
The class interface looks like
@interface MyCustomDefaults : NSObject {
NSString * userName;
NSString * password;
NSString * hostName;
NSNumber * port;
}
- (id) init;
- (id) initFromUserDefaults;
- (void) writeAsUserDefaults;
Thanks for your time.
--
"I never look back darling, it distracts from the now", Edna Mode (The
Incredibles)
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden