Re: Newb Question re NSUserDefaults and Ints
Re: Newb Question re NSUserDefaults and Ints
- Subject: Re: Newb Question re NSUserDefaults and Ints
- From: Graham Cox <email@hidden>
- Date: Sat, 30 Aug 2008 13:38:17 +1000
On 30 Aug 2008, at 12:14 pm, Andrei Kolev wrote:
Brad,
You can't store an int into [...] user defaults.
Sure you can:
- (void)setInteger:(NSInteger)value forKey:(NSString *)defaultName;
Note that NSInteger == int, so the book doesn't have a typo, it's just
using the pre-Leopard type conventions.
But anyway, the angle used by NSGradient is a float, not an int, so
you probably want:
- (void)setFloat:(float)value forKey:(NSString *)defaultName
Note that, again, CGFloat == float.
hth,
Graham
_______________________________________________
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