Re: NSCalendarDate bug?
Re: NSCalendarDate bug?
- Subject: Re: NSCalendarDate bug?
- From: cricket <email@hidden>
- Date: Thu, 2 Oct 2003 10:36:00 -0700
You want to use isEqualToDate, not isEqual (which tests for the two
objects being the same object, which they aren't in this case).
As far as the debugging issues, it sounds like you are using the
Deployment build style or have optimization turned on, which will make
stepping through code fairly difficult. So, either turn off
optimization or change your build style to Development.
- cricket
On Oct 2, 2003, at 10:13 AM, Lorenzo Thurman wrote:
I've noticed an odd problem with NSCalendarDate. Here's some code:
NSCalendarDate* today;
NSCalendarDate* tomorrow;
today = [NSCalendarDate calendarDate];
tomorrow = [NSCalendarDate calendarDate];
if([today isEqual:tomorrow])
NSLog(@"Yep");
If when stepping through the code in the debugger I "Print Description
to Console" for the variable tomorrow, I get this:
2003-10-02 12:06:15 -0500
But the variable today shows this:
<NSApplication: 0xdb0b0>
So of course the comparison fails. What gives? Also, I noticed that
when I reach these variables in the debugger and try to step over them,
the debugger highlighting jumps back the beginning of the function. It
will do this three times before proceeding to the next statement each
time I click on step over. Are these both bugs?
_______________________________________________
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.
_______________________________________________
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.