From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA01237; Thu, 8 Aug 2002 18:09:02 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA01440 for ; Thu, 8 Aug 2002 18:09:01 +0200 (MET DST) Received: from swan.mail.pas.earthlink.net (swan.mail.pas.earthlink.net [207.217.120.123]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g78G90n24320 for ; Thu, 8 Aug 2002 18:09:00 +0200 (MET DST) Received: from user-0ccegbj.cable.mindspring.com ([24.199.65.115] helo=dragonfly.localdomain) by swan.mail.pas.earthlink.net with smtp (Exim 3.33 #1) id 17cpqN-0003va-00 for caml-list@inria.fr; Thu, 08 Aug 2002 09:08:59 -0700 Received: from 209-9-234-140.sdsl.cais.net ([209.9.234.140]) (SquirrelMail authenticated user yminsky) by dragonfly.localdomain with HTTP; Thu, 8 Aug 2002 12:08:59 -0400 (EDT) Message-ID: <59147.209.9.234.140.1028822939.squirrel@dragonfly.localdomain> Date: Thu, 8 Aug 2002 12:08:59 -0400 (EDT) Subject: [Caml-list] interactive graphics with Tcl/Tk From: "Yaron M. Minsky" To: "Caml List " X-Priority: 3 Importance: Normal X-MSMail-Priority: Normal X-Mailer: SquirrelMail (version 1.2.6) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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