Re: NSDate And Super Class

2009-02-25 Thread Andy Lee
On Feb 25, 2009, at 12:28 PM, Andy Lee wrote: On Feb 25, 2009, at 12:03 PM, Richard Good wrote: Thanks for looking at the code. I tried to simplify things for the example so I removed as much as possible (maybe too much) that I thought was not directly relevant. However making all of your

Re: NSDate And Super Class

2009-02-25 Thread Andy Lee
On Feb 25, 2009, at 12:03 PM, Richard Good wrote: Thanks for looking at the code. I tried to simplify things for the example so I removed as much as possible (maybe too much) that I thought was not directly relevant. However making all of your suggested changes and maybe an extra retain o

Re: NSDate And Super Class

2009-02-25 Thread Richard Good
Thanks for looking at the code. I tried to simplify things for the example so I removed as much as possible (maybe too much) that I thought was not directly relevant. However making all of your suggested changes and maybe an extra retain or two, still yields an "Out of scope" problem in

Re: NSDate And Super Class

2009-02-24 Thread Andy Lee
On Feb 24, 2009, at 8:25 PM, Richard Good wrote: -(DateTest*)init{ [super init]; aDate =[NSDate date]; return self; } Wait a minute. I just figured out you're saying the *debugger* says datesubClass.aDate is out of scope, not the compiler as I thought. The

Re: NSDate And Super Class

2009-02-24 Thread Andy Lee
On Feb 24, 2009, at 8:25 PM, Richard Good wrote: Instance var creation DatesubClass* datesubClass = [[DatesubClass alloc]init]; At this point the datesubClass.aDate Instance variable is "out of scope" Your code works for me, verbatim, so there's something you're not showing us that's causin

NSDate And Super Class

2009-02-24 Thread Richard Good
I clearly don't understand how inheritance works for Objective C, at least not with the NSDate type. When I create a super class with an NSDate type as an instance variable and then instantiate a subclass of the superclass, I get an "out of Scope" error for the NSDate instance variable.