Re: Storing an unsignedLongLong
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