On this page:
control
view
connect

1.18 Guess GUI: "guess-gui.rkt"🔗ℹ

 (require htdp/guess-gui) package: htdp-lib

The teachpack provides three functions:

procedure

(control index)  symbol?

  index : natural-number?
reads out the indexth guess choice, starting with 0

procedure

(view msg)  true/c

  msg : (or/c string? symbol?)
displays its msg argument in the message panel

procedure

(connect handler)  true/c

  handler : (-> button% event% true/c)
connects a controller (handler) with the Check button displays frame

Example:
(connect (lambda (e b)
           (begin
             (printf "0th digit: ~s~n" (control 0))
             (view (control 0)))))