I have a working application I'm about to distribute and am tidying up NSLog statements in it. When I remove NSLog from from a "case" statement, the NSArray declared within the "case" statement errors as Expected expression before AND undeclared. Anybody any idea why this may be? This is happening on all case statements in my app where I'm now removing NSLog. An example code sections appears below:
switch (chosenScene)
{
case 0:
//NSLog(@"group1"); // the following NSArray errors with "expected expression.." AND "..group1Secondsarray undeclared"
NSArray *group1SecondsArray = [NSArray arrayWithObjects: @"Dummy",@"1/15",@"1/30",@"1/30",@"1/60",@"1/125",@"1/250",nil];
NSArray *group1FStopArray = [NSArray arrayWithObjects: @"Dummy",@"2.8",@"2.8",@"4",@"5.6",@"5.6",@"5.6",nil];
NSString *group1SecondsText = [group1SecondsArray objectAtIndex:slider.value];
calculatedSeconds.text = group1SecondsText;
NSString *group1FStopText = [group1FStopArray objectAtIndex:slider.value];
calculatedFStop.text = group1FStopText;
[group1SecondsText release];
[group1FStopText release];
break;