Warning: Enumeration values not handled in switch
Monkey Targets Forums/iOS/Warning: Enumeration values not handled in switch
| ||
Hi forum, I'm fairly new at monkeycode and so far I'm impressed - I don't come from a game developer background, but Monkeycode just makes perfect sense. Also, all target platforms I tested so far look identical, which is fantastic! Here's my first little issue, though. For the iOS target I just upgraded to XCode 4.2 / iOS5, the Monkey project is built with version 47c. I now get a warning when I build/run the project with both Monkey and XCode: "Warning: Enumeration values 'UITouchPhaseMoved' and 'UITouchPhaseStationary' not handled in switch" This refers to the line "switch( [touch phase] ){" in the gxtkInput::OnEvent() in main.mm (see further below). I also notice that a multi-touch gesture that used to work before doesn't work any more. Single-touch gestures still work fine. The only touch index that is registered is index 0. Looking at the code block below I think the touch index issue could be related to the warning. Did anyone come across that issue? The code above comes straight from MonkeyPro/modules/native/mojo.ios.cpp and is part of main.mm Cheers! Anatol |
| ||
OK, this was partly a real Monkeycode beginner's issue. Multi-touch gestures worked again once I deleted the previous iOS build... Still, XCode 4.2/iOS5 complains and issues the warning in my previous post. It would help to add UITouchPhaseMoved and UITouchPhaseStationery or a "default:" to the switch in modules/native/mojo.ios.cpp (see my post above) Currently any build of any project creates the warning in iOS. |