1.15 An Arrow GUI: "arrow-gui.rkt"
(require htdp/arrow-gui) | package: htdp-lib |
The teachpack provides functions for creating and manipulating an arrow GUI. We recommend using 2htdp/universe instead.
modelT (-> button% event% true)
A modelT is a function that accepts and ignores two arguments.
Reads out the current state of the message
field.
Displays s in the
message field.
Connects four
controllers with the four directions in the arrow window.
Example:
; Advanced (define (make-model dir) (lambda (b e) (begin (view dir) (printf "~a ~n" (control))))) (connect (make-model "left") (make-model "right") (make-model "up") (make-model "down"))
Now click on the four arrows. The message field contains the current
direction, the print-out the prior contents of the message field.