i have the following two pieces of code which i think should be identical
int temp = [[[myArray objectAtIndex:iIndex] objectAtIndex:jIndex] state];
if (temp > 0)
{
NSLog(@"TEST: %d",temp);
}
if ([[[myArray objectAtIndex:iIndex] objectAtIndex:jIndex] state] > 0)
{
NSLog(@"TEST: %d",temp);
}
state is just an int in the objects in the array with accessor like:
@property (assign)int state;
but when state is negative, the first version works (no output), but the second version outputs (for example) "TEST: -4" (?!)
is there any obvious reason why they might be different?