this is in revised syntax:
open Tk;
value root = opentk ();
value entry = Entry.create root;
bind ~events:[`KeyPress] ~action:(fun event -> Printf.fprintf stdout
"%in" event.ev_KeyCode) entry;
pack [entry];
mainLoop ();
Running MacOS X, upon entering text into the entry box, all I ever see
in stdout is 0. This doesn't seem quite right with me. Any comments or
suggestions?
PS my intent is that in a more complicated UI, pressing the enter key
should do the same thing as pushing the OK UI button.
.