NSCalendarDate unarchives from plist as NSCFDate
NSCalendarDate unarchives from plist as NSCFDate
- Subject: NSCalendarDate unarchives from plist as NSCFDate
- From: Greg Hulands <email@hidden>
- Date: Sun, 11 May 2003 14:45:04 +1000
Hi,
I have a preference file that stores an NSCalendarDate object in a
plist file. When I re-read in the file when the object initializes, it
has to perform a category method I defined on NSCalendarDate, but when
it reads the plist in, it is creating a NSCFDate object and not a
NSCalendarDate object. Is this expected behaviour? Is this a bug? Is
this a known bug? If not, i will file a bug.
my category is as follows:
@implementation NSCalendarDate (SameDay)
- (BOOL)isSameDayAsDate:(NSCalendarDate *)date
{
int sYear = [self yearOfCommonEra];
int sMonth = [self monthOfYear];
int sDay = [self dayOfMonth];
int dYear = [date yearOfCommonEra];
int dMonth = [date monthOfYear];
int dDay = [date dayOfMonth];
return (sYear == dYear && sMonth == dMonth && sDay == dDay);
}
@end
Any help is appreciated.
Regards,
Greg
_______________________________________________
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.