Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: cheshirekow on July 15, 2010, 11:57:39 am
-
Is there a way to configure wxSmith to use enums for IDs instead of "static const long". I understand the reasons for wanting to use static const long, but there are cases where I actually want an enum... for instance so I can use a switch(){} statement to case through all the possible IDs.
-
why you think a switch() won't work with static const long? Have you try it? If not, give a shot and provide your results for further analysis by various volunteers.
Cheers.
stefanos_
-
why you think a switch() won't work with static const long? Have you try it? If not, give a shot and provide your results for further analysis by various volunteers.
Cheers.
stefanos_
It does not work, because the value is calculated at runtime with wxNewId() and that is not allowed in switch-statements.
-
Indeed it provides unique IDs upon runtime. Next time, I should do my homework ;)p
For some reason I confused them with #defines.