• 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: Compiler Warning: 'NSDate' may not respond to '+dateWithTimeInterval:sinceDate:'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiler Warning: 'NSDate' may not respond to '+dateWithTimeInterval:sinceDate:'


  • Subject: Re: Compiler Warning: 'NSDate' may not respond to '+dateWithTimeInterval:sinceDate:'
  • From: Nick Peelman <email@hidden>
  • Date: Fri, 26 Mar 2010 15:52:41 -0400

According to the docs, that method is only available in 10.6 and
later.  Are you building for 10.5?

http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSDate_Class/Reference/Reference.html#//apple_ref/doc/uid/20000188-SW14

-nick

--
Nick Peelman
email@hidden



On Fri, Mar 26, 2010 at 4:23 AM, Alec Stewart <email@hidden> wrote:
> This compiler warning " 'NSDate' may not respond to
> '+dateWithTimeInterval:sinceDate:' "is driving me up the wall.
>
> I don't understand why I am getting the warning because, by all indications,
> +dateWithTimeInterval:sinceDate: has not been deprecated.
>
> I would be extremely grateful for any insight.
>
>
> Here's my code:
>
>    NSDate *dateWithoutHundredths;
>
>    dateWithoutHundredths = [NSDate dateWithString:[NSString
> stringWithFormat:@"d-d-d d:d:d +0000", year, month, day,
> hour, minutes, seconds]];
>
>    NSTimeInterval hundredthsToAdd = (double)(hundredth / 100.0);
>
>    date = [NSDate dateWithTimeInterval:hundredthsToAdd
> sinceDate:dateWithoutHundredths]; //This is the line the warning shows up on
> _______________________________________________
>
> 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
>
_______________________________________________

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: 
 >Compiler Warning: 'NSDate' may not respond to '+dateWithTimeInterval:sinceDate:' (From: Alec Stewart <email@hidden>)

  • Prev by Date: Re: Sending a Cmd-V keystroke
  • Next by Date: Re: Compiler Warning: 'NSDate' may not respond to '+dateWithTimeInterval:sinceDate:'
  • Previous by thread: Re: Compiler Warning: 'NSDate' may not respond to '+dateWithTimeInterval:sinceDate:'
  • Next by thread: Re: Compiler Warning: 'NSDate' may not respond to '+dateWithTimeInterval:sinceDate:'
  • Index(es):
    • Date
    • Thread