• 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
Core Data "Integer 32" attribute type <-> NSNumber
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Core Data "Integer 32" attribute type <-> NSNumber
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: NSObjectController and Core Data
  • Next by Date: Webview and printing with templates
  • Previous by thread: Re: NSObjectController and Core Data
  • Next by thread: Re: Core Data "Integer 32" attribute type <-> NSNumber
  • Index(es):
    • Date
    • Thread