Hi there,
Please could someone take a look at the following short bit of code and see if you can spot why I'm getting an "Expected expression before 'Location'" error when I try to compile? It's driving me nuts...
If I comment out the line after "case FIRST_ACTION:" it compiles fine.
TIA
Matt
Please could someone take a look at the following short bit of code and see if you can spot why I'm getting an "Expected expression before 'Location'" error when I try to compile? It's driving me nuts...
Code:
-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
switch (buttonIndex) {
case FIRST_ACTION:
Location *location = [[self viewController] currentLocation];
break;
case SECOND_ACTION:
break;
case THIRD_ACTION:
break;
}
}
If I comment out the line after "case FIRST_ACTION:" it compiles fine.
TIA
Matt