Re: NSDate scope

2009-06-25 Thread John Baldwin
I've gone back to my code and tried to reproduce the error. Now I can't. So I was doing something else stupid that I've since changed. Now if I do the usual [[NSDate alloc] init] it seems to be behaving as expected. [NSDate date] can generate the error, but that doesn't surprise me. John

Re: NSDate scope

2009-06-21 Thread Kyle Sluder
On Sat, Jun 20, 2009 at 4:52 PM, John Baldwin wrote: > I declared a (NSDate *) in my .h file. Where? Inside an @implementation, or as a global variable? If it's a global variable, you are aware that for every translation unit that imports your header, you will wind up with a different variable?

Re: NSDate scope

2009-06-21 Thread Ken Thomases
On Jun 20, 2009, at 6:52 PM, John Baldwin wrote: I declared a (NSDate *) in my .h file. NSDate *originalDate; The above is unclear. You mean you declared an instance variable in some class with type NSDate*? Then in my init method, I initialized it to the current date. I tried various