3
let parse_logic_message() =
4
let s = input_line stdin in
6
ignore (int_of_string s); s
8
Failure _ -> "invalid server response";;
11
output_string stdout "bouton\n"; flush stdout;
12
let s = parse_logic_message () in
13
Button.configure b [Text s];;
15
let topwindow = openTk();;
17
let bcount = Button.create topwindow [Text "never clicked"];;
19
let bclick = Button.create topwindow
20
[Text "hello world!"; Command(bclick_cb bcount)];;
22
let bquit = Button.create topwindow [Text "Quit"; Command closeTk];;
25
Button.configure bquit
26
[Background (NamedColor "red"); Foreground (NamedColor "white")];
27
pack [bclick; bcount; bquit] [Side Side_Left];