Re: dateWithCalendarFormat: problem
Re: dateWithCalendarFormat: problem
- Subject: Re: dateWithCalendarFormat: problem
- From: Tito Ciuro <email@hidden>
- Date: Sat, 25 Jan 2003 12:41:58 +0100
On Saturday, January 25, 2003, at 03:14 AM, Jeff LaMarche wrote:
>
Any idea why I would get a "selector not recognized" error when
>
calling dateWithCalendarFormat: on an NSCalendarDate?
>
>
Here's the error message:
>
>
*** -[NSCFDate descriptionWithCalendarFormat:]: selector not recognized
>
>
The NSCalendarDate was created earlier like this:
>
>
NSCalendarDate *date = [NSCalendarDate calendarDate];
This works for me:
NSCalendarDate *date = [NSCalendarDate calendarDate];
NSString *datestr = [date descriptionWithCalendarFormat:@"%a %m/%d/%y
%I:%M %p"];
NSLog(@"datestr: %@", datestr);
Are you sure you haven't overwritten 'date ' with a NSDate later on in
the code?
-- Tito
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.