• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Newb Question re NSUserDefaults and Ints
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Newb Question re NSUserDefaults and Ints (From: Brad Gibbs <email@hidden>)
 >Re: Newb Question re NSUserDefaults and Ints (From: Andrei Kolev <email@hidden>)

  • Prev by Date: Re: Design Question: Bindings & Custom Views
  • Next by Date: Re: Design Question: Bindings & Custom Views
  • Previous by thread: Re: Newb Question re NSUserDefaults and Ints
  • Next by thread: Re: Newb Question re NSUserDefaults and Ints
  • Index(es):
    • Date
    • Thread