Having a problem with simple bool
- by Code
Hi guys,
I've some really simple code that checks if my bool is == YES but it does not ever enter.
NSLog(@"boool %d",self.arrayAlreadyPopulated );
if (self.arrayAlreadyPopulated == YES)
{
Match *aMatch = [appDelegate.matchScoresArray objectAtIndex:(numMatchCounter)];
aMatch.teamName1 = TeamNameHolder;
}
else
{
Match *aMatch = [[Match alloc] init];
aMatch.teamName1 = TeamNameHolder;
[appDelegate.matchScoresArray addObject:aMatch];
[aMatch release];
}
The debug at the top says that the value of self.arrayAlreadyPopulated is 1 on the 2nd pass as it should be.
But it never enters the first first part but jumps down to the 'else'
I cant see for the life of me what the problem is. -.-
Anybody able to clue me in?
Thanks
-Code
EDIT declaration code
int theCounterCauseABoolWontWork;
@property (nonatomic) int theCounterCauseABoolWontWork;
@synthesize theCounterCauseABoolWontWork;