fix / typo in events.rst

The right function call has to be setType