On this page:
control
view
connect

1.17 Lookup GUI: "lkup-gui.rkt"🔗ℹ

 (require htdp/lkup-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 event-handler)  true/c

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

Example:
(connect
 (lambda (e b)
   (view (control))))
This example simply mirrors what the user types in to the message field.