caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Yaron M. Minsky" <yminsky@CS.Cornell.EDU>
To: "Caml List " <caml-list@inria.fr>
Subject: [Caml-list] interactive graphics with Tcl/Tk
Date: Thu, 8 Aug 2002 12:08:59 -0400 (EDT)	[thread overview]
Message-ID: <59147.209.9.234.140.1028822939.squirrel@dragonfly.localdomain> (raw)

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


             reply	other threads:[~2002-08-08 16:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-08 16:08 Yaron M. Minsky [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59147.209.9.234.140.1028822939.squirrel@dragonfly.localdomain \
    --to=yminsky@cs.cornell.edu \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).