From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA16603 for caml-red; Tue, 2 Jan 2001 12:07:49 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id IAA23205 for ; Sun, 31 Dec 2000 08:51:43 +0100 (MET) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id eBV7pbD10146 for ; Sun, 31 Dec 2000 08:51:42 +0100 (MET) Received: from tet.kurims.kyoto-u.ac.jp (isdnppp2.kurims.kyoto-u.ac.jp [130.54.16.103]) by kurims.kurims.kyoto-u.ac.jp (8.9.3/3.7W) with ESMTP id QAA16152; Sun, 31 Dec 2000 16:51:29 +0900 (JST) Received: from localhost (localhost [127.0.0.1]) by tet.kurims.kyoto-u.ac.jp (8.11.1/8.11.1) with ESMTP id eBV7p7b07102; Sun, 31 Dec 2000 16:51:07 +0900 (JST) (envelope-from garrigue@kurims.kyoto-u.ac.jp) To: checker@d6.com Cc: caml-list@inria.fr Subject: Re: labltk bind ~events list questions/bugs? In-Reply-To: <4.3.2.7.2.20001226234205.00afd710@shell16.ba.best.com> References: <4.3.2.7.2.20001226234205.00afd710@shell16.ba.best.com> X-Mailer: Mew version 1.94.2 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20001231165106J.garrigue@kurims.kyoto-u.ac.jp> Date: Sun, 31 Dec 2000 16:51:06 +0900 From: Jacques Garrigue X-Dispatcher: imput version 20000228(IM140) Sender: weis@pauillac.inria.fr From: Chris Hecker > Hi, a few labltk questions: > > 1. Does the ~events list passed to Tk.bind mean the callback should > get all of those events? I can't think of what else it's for, but > it doesn't seem to work correctly. I only get one of the types, or > sometimes none. This is on Win98 with tcl/tk 8.3. When in doubt, you should read the Tk man page. In this case, it tells you that you can bind a _sequence_ of events. So this is not an "or", the callback is only called if all these events happen, and in that precise order. > 2. As another question, if I have ~events:[`Modified > ([`Shift],`KeyPress)], sometimes I just get the keys that were pressed > when the shift key was down, sometimes I get a zillion Shift_L events, > and sometimes I get nothing. Stranger. This should be only the first case. At least, this is how it works on X11. > 3. I'd like to be able to distribute an executable compiled with > labltk and lablgl without having people have to have tcl/tk installed. > Has anybody successfully statically linked tk into an ocaml app? > Perl/Tk is set up such that it doesn't depend on the tcl/tk > distribution, so I assume this is possible. Would it be a ton of > work? Somebody on this list explained a while ago (around april 2000?) how one could theoretically put in the linked binary the tcl source code needed by the interpreter to boot. Since Labltk requires the tcl interpreter to run (contrary to PerlTk, I believe), this would probably be the way to go. But I have no precise idea on how to do it, and how much code you must link in. If you really need to distribute statically linked versions of your code, you might wish to look at lablgtk. Unison moved to it partly because of that, and also because it allows you to create a better finished product than labltk. Best wishes, Jacques --------------------------------------------------------------------------- Jacques Garrigue Kyoto University garrigue at kurims.kyoto-u.ac.jp JG