When I run this method the two properties I have are set to (NULL) when I try and access them outside of the if statement. But they are set to 0 and NO if I check them inside the if statement.
-(id) init
{
NSLog(@"Jumping into the init method!");
if (self = [super init]) {
NSLog(@"Running the init method extras");
accumulator = 0;
NSLog(@"self.accumulator is %g", accumulator);
decimal = NO;
}
NSLog(@"Calc after init is: %@ and %@", self.accumulator, self.decimal);
return self;
}
Any suggestions as to why what comes out is different from what's done in the for loop?