{"size": 814, "ext": "scrbl", "max_stars_repo_path": "htdp-doc/teachpack/htdp/scribblings/lkup-gui.scrbl", "max_stars_repo_name": "bdeket/htdp", "max_stars_repo_stars_event_min_datetime": "2015-01-14T20:28:41.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T04:04:26.000Z", "max_issues_repo_path": "htdp-doc/teachpack/htdp/scribblings/lkup-gui.scrbl", "max_issues_repo_name": "bdeket/htdp", "max_issues_repo_issues_event_min_datetime": "2015-01-14T19:50:21.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-19T21:38:00.000Z", "max_forks_repo_path": "htdp-doc/teachpack/htdp/scribblings/lkup-gui.scrbl", "max_forks_repo_name": "bdeket/htdp", "max_forks_repo_forks_event_min_datetime": "2015-01-14T19:11:38.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-24T05:11:39.000Z"}
{"max_stars_count": 85, "max_issues_count": 132, "max_forks_count": 81, "avg_line_length": 26.2580645161, "max_line_length": 82, "alphanum_fraction": 0.7297297297}
#lang scribble/doc

@(require scribble/manual "shared.rkt" (for-label racket teachpack/htdp/lkup-gui))

@teachpack["lkup-gui"]{Lookup GUI}

@defmodule[#:require-form beginner-require htdp/lkup-gui]

The teachpack provides three functions:

@defproc[(control [index natural-number?]) symbol?]{
 reads out the @racket[index]th guess choice, starting with 0}

@defproc[(view [msg (or/c string? symbol?)]) true/c]{
 displays its @racket[msg] argument in the message panel}

@defproc[(connect [event-handler (-> button% event% true/c)]) true/c]{
 connects a controller (@racket[handler]) with the Check button displays frame}

Example:
@;%
@(begin
#reader scribble/comment-reader
(racketblock
(connect
 (lambda (e b)
   (view (control))))
))
@;%
This example simply mirrors what the user types in to the message field.
