• 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: NSNumber compare: Giving Unexpected Results
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSNumber compare: Giving Unexpected Results


  • Subject: Re: NSNumber compare: Giving Unexpected Results
  • From: Quincey Morris <email@hidden>
  • Date: Wed, 8 Sep 2010 13:24:24 -0700

On Sep 8, 2010, at 12:40, Chris Tracewell wrote:

> I must admit that I do not understand why this is so. I can for example use if ([someButton isEnabled])  and it returns a BOOL and the if statement works fine. If you have any pointers or docs that explains this further I would really appreciate it as right now I feel scared about how I have been evaluating BOOL's returned in all of my own custom methods.

You need to find the header file that declares 'isLessThanZero' in the compilation unit where it's called. Perhaps the return type is missing or wrong there. If it correctly says BOOL, then you need to find which declaration of BOOL is being used and check that it's the correct one. Also, check the build settings for both the application and the framework to make sure there isn't a setting that causes BOOL/char values to be handled differently. It's possible that Xcode's Build | Preprocess may produce something useful.



_______________________________________________

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: 
 >Re: NSNumber compare: Giving Unexpected Results (From: Chris Tracewell <email@hidden>)

  • Prev by Date: Re: NSView alphaValue animation on 10.5
  • Next by Date: Re: NSNumber compare: Giving Unexpected Results
  • Previous by thread: Re: NSNumber compare: Giving Unexpected Results
  • Next by thread: Re: NSNumber compare: Giving Unexpected Results
  • Index(es):
    • Date
    • Thread