dialect "rtobjectdraw"
   
object {
    inherit  graphicApplicationSize (400 @ 400)

    // the field to hold user input
    def input:TextField = textFieldLabeled ("Type your name")

    // add the actual text field to top of window
    append (input)

    // respond to mouse presses on the canvas
    method onMousePress (point: Point) -> Done {
        def txt: Text =
            textAt (point) with (input.text) on (canvas)
        txt.fontSize := 36
    }

    startGraphics
}
