Was also getting this problem on another event handler, and couldn't find a solution, but the g4p creator messaged me back with:
When the textfield has focus (i.e. it has the text-insertion cursor) you are not allowed to change the value stored in the textfield programmatically using setText.
Was also getting this problem on another event handler, and couldn't find a solution, but the g4p creator messaged me back with: