• 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: Storing an unsignedLongLong
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Storing an unsignedLongLong


  • Subject: Re: Storing an unsignedLongLong
  • From: Andrew Farmer <email@hidden>
  • Date: Sat, 21 Jun 2008 22:13:05 -0700

On 21 Jun 08, at 21:59, Adam Thorsen wrote:
I'm attempting to store an unsigned long long (stored in memory in an NSNumber) in user defaults, but it appears to be truncated upon retrieval. This may have something to do with the fact that I'm using the setInteger method of NSUserDefaults to write the unsigned long long value.

It probably does! On most 32-bit systems, long longs are 64 bits wide, while integers are 32 bits.


However, there appears to be no other way to set an integer in user defaults. Is there another technique I can use within the Cocoa API?

How about [[NSUserDefaults standardUserDefaults] setObject:myNSNumber forKey:key] ?
_______________________________________________


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: 
 >Storing an unsignedLongLong (From: Adam Thorsen <email@hidden>)

  • Prev by Date: Re: Bindings Concept Question
  • Next by Date: Re: Why does this https post request always return "404 Not Found"
  • Previous by thread: Storing an unsignedLongLong
  • Next by thread: Fwd: [Q] IMKit: IMKInputController and its menu handler
  • Index(es):
    • Date
    • Thread