Added method to write text to a text field generated by this application