caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>
To: arnaud.rouanet@inria.fr
Cc: caml-list@inria.fr, julien.forget@inria.fr
Subject: Re: [Caml-list] Camltk: missing State Hidden constructor
Date: Tue, 21 Oct 2003 10:38:35 +0900	[thread overview]
Message-ID: <20031021103835Z.garrigue@kurims.kyoto-u.ac.jp> (raw)
In-Reply-To: <16271.49347.286598.76552@charpentier.inria.fr>

From: Arnaud Rouanet <arnaud.rouanet@inria.fr>

> 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


      reply	other threads:[~2003-10-21  1:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-17 10:13 Arnaud Rouanet
2003-10-21  1:38 ` Jacques Garrigue [this message]

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=20031021103835Z.garrigue@kurims.kyoto-u.ac.jp \
    --to=garrigue@kurims.kyoto-u.ac.jp \
    --cc=arnaud.rouanet@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=julien.forget@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).