Please make an effort, he did say that event wasn't avalaible (which is why you made a suggestion, a good one) and that your example had a mistake in your example : you hardcoded the name of the event inside the on dialog definition, it doesn't make sense to check $devent inside that block of code, $devent will always be init.