I thought to be smart and define a sets of constants, just like Apple.
e.g. NSTableViewNoColumnAutoresizing
.h file:
extern int const myConstant;
.m file:
int const myConstant = 9;
So I figured I could use these in a switch
swith ([delegate mySwitch]) {
case myConstant:
break;
}
But this gives a compile error. Is this normal and I can not do things in this manner, or did I do something wrong?
error: case label does not reduce to integer constant
e.g. NSTableViewNoColumnAutoresizing
.h file:
extern int const myConstant;
.m file:
int const myConstant = 9;
So I figured I could use these in a switch
swith ([delegate mySwitch]) {
case myConstant:
break;
}
But this gives a compile error. Is this normal and I can not do things in this manner, or did I do something wrong?
error: case label does not reduce to integer constant