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 DAA25748; Tue, 21 Oct 2003 03:38:41 +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 DAA15586 for ; Tue, 21 Oct 2003 03:38:40 +0200 (MET DST) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h9L1cb115125; Tue, 21 Oct 2003 03:38:37 +0200 (MET DST) Received: from localhost (suiren.kurims.kyoto-u.ac.jp [130.54.16.25]) by kurims.kurims.kyoto-u.ac.jp (8.9.3p2-20030924/3.7W) with ESMTP id KAA01652; Tue, 21 Oct 2003 10:38:35 +0900 (JST) To: arnaud.rouanet@inria.fr Cc: caml-list@inria.fr, julien.forget@inria.fr Subject: Re: [Caml-list] Camltk: missing State Hidden constructor In-Reply-To: <16271.49347.286598.76552@charpentier.inria.fr> References: <16271.49347.286598.76552@charpentier.inria.fr> X-Mailer: Mew version 1.94.2 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20031021103835Z.garrigue@kurims.kyoto-u.ac.jp> Date: Tue, 21 Oct 2003 10:38:35 +0900 From: Jacques Garrigue X-Dispatcher: imput version 20000228(IM140) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 jacques:01 dynamically:01 widget:01 labltk:01 widget:01 incompatible:01 8.3.:01 jacques:01 unsafe:01 caml:01 garrigue:01 garrigue:01 configure:02 configure:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk From: Arnaud Rouanet > We wanted to use Canvas.configure_text, which accepts an State state > option, where state may only be Active | Normal | Disabled. We checked > the Tcl/Tk documentation and there is an additional "hidden" state > since version 8.3, which would be perfect for our purpose but this > doesn't appear in the current Camltk version. It seems the previous > developper used a trick for this: in his modified version of Camltk, > the constructor Hidden has been added and then everything just works > fine. [..] > Therefore, we would like to know if there is another way to > dynamically hide the text, using the standard Camltk distribution. It > is rather strange that the State Hidden constructor is not available > in Camltk. Is there a good reason for this ? The reason is that not everybody is using Tcl/Tk 8.3, so that having it in by default would be unsafe. An idea would be to generate from different description files for each version of Tk, but this would loose binary compatibility (and need some work). So currently, everybody is limited to Tcl/Tk 8.0 functionality. If your need is punctual, you can define wrap the function by hand in caml: let hide w = Protocol.tkEval [| Widget.name w; TkToken"configure"; TkToken"-hidden" |] With labltk, you should be more explicit with the widget type intended. let hide (w : text widget) = Protocol.tkEval [| Widget.name w; TkToken"configure"; TkToken"-hidden" |] Of course your program becomes incompatible with versions older than 8.3. Jacques Garrigue ------------------- 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