• 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
NSCalendarDate unarchives from plist as NSCFDate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: NSCalendarDate unarchives from plist as NSCFDate
      • From: Wolfgang Ante <email@hidden>
  • Prev by Date: Re: Top five reasons your NSTableView doesn't respond to double
  • Next by Date: Re: NSMovieView stops playing
  • Previous by thread: Re: Top five reasons your NSTableView doesn't respond to double
  • Next by thread: Re: NSCalendarDate unarchives from plist as NSCFDate
  • Index(es):
    • Date
    • Thread