caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] interactive graphics with Tcl/Tk
@ 2002-08-08 16:08 Yaron M. Minsky
  2002-08-05 17:51 ` [Caml-list] Debbuging interactive program Christophe Raffalli
  2002-08-09  1:22 ` [Caml-list] interactive graphics with Tcl/Tk Jacques Garrigue
  0 siblings, 2 replies; 3+ messages in thread
From: Yaron M. Minsky @ 2002-08-08 16:08 UTC (permalink / raw)
  To: Caml List 

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-08-09  9:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-08 16:08 [Caml-list] interactive graphics with Tcl/Tk Yaron M. Minsky
2002-08-05 17:51 ` [Caml-list] Debbuging interactive program Christophe Raffalli
2002-08-09  1:22 ` [Caml-list] interactive graphics with Tcl/Tk Jacques Garrigue

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).