There's certainly nothing wrong with switch-case, but the wrong event warning was already reported - see bug list.