On Sun, Aug 31, 2008 at 12:13 PM, Mark Allan <[EMAIL PROTECTED]> wrote: > For what it's worth, I also get these compiler warnings for the line with > [sharedUserDefaultsController save:] > > warning: multiple methods named '-save:' found > warning: using '-(void)save:(id)sender' > warning: also found '-(BOOL)save:(NSError **)error'
The compiler doesn't know which method you're trying to invoke, because +[NSUserDefaultsController sharedUserDefaultsController] is typed to return id. You need to cast the return value of this method call as an NSUserDefaultsController to satisfy the compiler. Also, you aren't storing the value of [super init] in self, which is incorrect. Your -init method needs to look like this: > -(id)init > { > if(self = [super init]) // one = is intentional > { > NSUserDefaultsController *shared = [NSUserDefaultsController > sharedUserDefaultsController]; > [shared setAppliesImmediately:NO]; > myPrefs = [NSUserDefaults standardUserDefaults]; > [self readPrefs]; > } > > return self; > } This probably won't address your problem, but it's important. --Kyle Sluder _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]