• 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: Warning about comparison between pointer and integer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Warning about comparison between pointer and integer


  • Subject: Re: Warning about comparison between pointer and integer
  • From: "Eric E. Dolecki" <email@hidden>
  • Date: Wed, 16 Dec 2009 11:41:16 -0500

Ah okay - thanks. I am now doing this:

if( [prefs objectForKey:@"alarm1Hour"] == nil ){

    ...

On Wed, Dec 16, 2009 at 11:33 AM, Scott Ribe <email@hidden>wrote:

> > integerForKey
>
> Returns an integer, not a pointer. See the docs.
>
> If you want to check if the key exists, then objectForKey will return nil
> of
> the key is not found.
>
> --
> Scott Ribe
> email@hidden
> http://www.killerbytes.com/
> (303) 722-0567 voice
>
>
>


--
http://ericd.net
Interactive design and development
_______________________________________________

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: 
 >Warning about comparison between pointer and integer (From: "Eric E. Dolecki" <email@hidden>)
 >Re: Warning about comparison between pointer and integer (From: Scott Ribe <email@hidden>)

  • Prev by Date: Re: Warning about comparison between pointer and integer
  • Next by Date: Re: Warning about comparison between pointer and integer
  • Previous by thread: Re: Warning about comparison between pointer and integer
  • Next by thread: Re: Warning about comparison between pointer and integer
  • Index(es):
    • Date
    • Thread