Re: Preferences using NSUserDefaults (newbie)
Re: Preferences using NSUserDefaults (newbie)
- Subject: Re: Preferences using NSUserDefaults (newbie)
- From: Matt Ridley <email@hidden>
- Date: Thu, 21 Jun 2001 19:22:41 +0100
On 21/6/01 11:10 am, Jorge Salvador Caffarena <email@hidden> wrote:
>
Also they show some code to initialize the preferences for the first
>
time, and they use this:
>
[defaultPrefs setBool: YES forKey: somePrefOnOrOff];
>
But the compiler complaints here and says that "NSMutableDictionary do
>
not respond to setBool:forKey message".
That's true; it's an error in the sample code at CocoaDevCentral. Instead,
use this:
[defaultPrefs setObject: YES forKey: somePrefOnOrOff];
If you look at the documentation for NSMutableDictionary, you'll see what
methods it does and doesn't support.
--
// Matt
- (void)sendMeEmail {
[[NSWorkspace sharedWorkspace] openURL:
[NSURL URLWithString:@"
mailto:email@hidden"]];
}