Put doctor frame event handler inside of object code.