Core Data "Integer 32" attribute type <-> NSNumber
Core Data "Integer 32" attribute type <-> NSNumber
- Subject: Core Data "Integer 32" attribute type <-> NSNumber
- From: "Sean McBride" <email@hidden>
- Date: Tue, 13 Feb 2007 15:58:58 -0500
- Organization: Rogue Research
Hi all,
Core Data attributes may be of several types, including "Integer 32".
What is the correct way to convert that to and from an NSNumber?
NSInteger32AttributeType is documented as "a 32-bit signed integer
attribute". But NSNumber does not seem to have any sint32Value method.
Should I use intValue? longValue? This may seem nitpicky, but I want to
do this properly now so that the eventual switch to 64bit will be less
painful.
My guess is:
NSInteger16AttributeType - shortValue
NSInteger32AttributeType - intValue
NSInteger64AttributeType - longLongValue
Will that be ok in both ILP32 and LP64?
Thanks,
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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