Possible bug in NSCalendarDate
Possible bug in NSCalendarDate
- Subject: Possible bug in NSCalendarDate
- From: Jeremy Dronfield <email@hidden>
- Date: Wed, 11 Feb 2004 18:36:35 +0000
I've come across a strange issue when initializing an NSCalendarDate
from a string passed through a method argument. If I do this:
- (void)displayEntryForPath:(NSString *)path withDate:(NSString
*)pathDate
{
NSCalendarDate *currentDate;
currentDate = [[NSCalendarDate alloc] initWithString:pathDate
calendarFormat:@"%Y/%B/%d %A"];
[...etc]
}
I get a nil date. However, if I create a new pointer to the string like
so:
- (void)displayEntryForPath:(NSString *)path withDate:(NSString
*)pathDate
{
NSCalendarDate *currentDate;
NSString *dateString = pathDate;
currentDate = [[NSCalendarDate alloc] initWithString:dateString
calendarFormat:@"%Y/%B/%d %A"];
[...etc]
}
the date is initialized normally. Is this a bug, or am I missing some
elementary yet arcane nuance in Obj-C?
-Jeremy
========================================
email@hidden
theLocustFarm.net:
- fractious fiction at
http://freespace.virgin.net/jeremy.dronfield
========================================
_______________________________________________
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.