Browse thread
[Caml-list] interactive graphics with Tcl/Tk
- Yaron M. Minsky
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2002-08-08 (16:09) |
From: | Yaron M. Minsky <yminsky@C...> |
Subject: | [Caml-list] interactive graphics with Tcl/Tk |
I'm trying to use tcl/tk for doing interactive graphics from the toplevel. And, lord help me, I'm trying to do it on cygwin. My basic solution I came up with is this: I have one thread doing all the labltk calls. That thread also polls a channel where it effectively picks up RPC requests. SO, when I want to draw something on the screen, I stuff the appropriate function into the channel, the TclTk thread picks it up and executes that function, and then sends back a response, at which point the calling thread continues. Anyway, it all seems well and good, but when I actually try to do it, for some reason the i/o on the caml toplevel locks up. So if I type: # Graphing.init (); print_string "Hello World!\n";; Hello World! - : unit = () # Graphing.init starts up the Tcl/Tk window as expected, and the print works, also as expected. But from that point on until I kill the Tcl/Tk window, I can't get the toplevel to respond to keypresses. It's as if the Tcl/Tk thread has stolen stdin. Does anyone know how to work around this? y -- |--------/ Yaron M. Minsky \--------| |--------\ http://www.cs.cornell.edu/home/yminsky/ /--------| Open PGP --- KeyID B1FFD916 (new key as of Dec 4th) Fingerprint: 5BF6 83E1 0CE3 1043 95D8 F8D5 9F12 B3A9 B1FF D916 ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners