• 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: Simple question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple question


  • Subject: Re: Simple question
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 22 Apr 2010 10:43:07 -0700

On Apr 22, 2010, at 10:21, Arnold Nefkens wrote:

> Yeah the keys are ints and this helps a lot.
>
> Thanks again...
>
> On 22 apr 2010, at 18:31, Reinhard Segeler wrote:
>
>> Hi,
>>
>> correct me if I'm wrong, but what you're doing is a calculation with the pointers ( * of NSNumber) not the values. You have to calculate it like this:
>>
>> NSInteger fieldOne 	= [ [ managedObject valueForKey:@"key1"] intValue]; // if it's an integer

A minor correction. This should either be:

	int fieldOne = [ [ managedObject valueForKey:@"key1"] intValue];

or:

	NSInteger fieldOne = [ [ managedObject valueForKey:@"key1"] integerValue];

Otherwise the code is not quite portable between 32- and 64-bit architectures.


_______________________________________________

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: 
 >Simple question (From: Arnold Nefkens <email@hidden>)
 >Re: Simple question (From: Reinhard Segeler <email@hidden>)
 >Re: Simple question (From: Arnold Nefkens <email@hidden>)

  • Prev by Date: Re: Simple question
  • Next by Date: Re: NSOperation and WebView
  • Previous by thread: Re: Simple question
  • Next by thread: Re: Problem with CoreAnimation and OpenGL drawing from a safari plugin
  • Index(es):
    • Date
    • Thread