28 lines
747 B
Plaintext
28 lines
747 B
Plaintext
{ (define LIBNAME "Guess GUI")
|
|
(include "head.tinc") }
|
|
|
|
<p>The teachpack <code>guess-gui.ss</code> implements three functions:
|
|
<menu>
|
|
<li> <code>{(idx control)} : N -> symbol</code>
|
|
<br> to read out the i-th guess choice, starting with 0
|
|
|
|
<li> <code>{(idx view)} : (union string symbol) -> true </code>
|
|
<br> to display its argument in the message panel
|
|
|
|
<li> <code>modelT = (button% event% -> true)</code>
|
|
<br>
|
|
<code>{(idx connect)} : modelT -> true</code>
|
|
<br> to connect a controller with the Check button
|
|
<br> displays frame
|
|
</menu>
|
|
|
|
<p>Example:
|
|
<pre>
|
|
(connect (lambda (e b)
|
|
(begin
|
|
(printf "0th digit: ~s~n" (control 0))
|
|
(view (control 0)))))
|
|
</pre>
|
|
|
|
{(include "foot.tinc")}
|