caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>
To: fabien.fleutot@inria.fr
Cc: caml-list@inria.fr
Subject: Re: LablTk
Date: Fri, 21 Jul 2000 09:42:53 +0900	[thread overview]
Message-ID: <20000721094253L.garrigue@kurims.kyoto-u.ac.jp> (raw)
In-Reply-To: Your message of "Mon, 10 Jul 2000 15:51:19 +0200" <3969D4D7.8001219E@inria.fr>

From: Fabien Fleutot <fabien.fleutot@inria.fr>

> I have two problems with LablTk :
> 
> - I want to prevent a window from being destroyed by the WM : it's a
> pretty long to build window, and I'd like to hide it instead of actually
> destroy it when the user clicks on the delete button of the window
> manager. It's easy to do in some langages such as Java, but I can't find
> the way to do it with Labltk.

I do not see anything to do that in Tcl/Tk. You can iconify a window,
using Wm.iconify, but not hide it.
If you really need this kind of power, you may consider switching to
GTK.

> - I want to use a button to destroy a window. But I can't do
> 
> Button.create win ~text:"Close" ~command:(fun _ -> destroy win)
> 
> since when the destroy function starts, the button, which belongs to
> win, is in use and prevents to destroy its parent win. There is a
> specific function (i.e. Tk_EventuallyFree) in Tcl/Tk to handle such
> cases, but I don't know how to do with LablTk. What I'm currently doing
> is to put the destroying function in a Timer callback, to destroy the
> window .1s after the button has been released, but it's not very safe...

I don't see why your above code wouldn't work. I'm doing it everywhere in
ocamlbrowser (Jg_button.create_destroyer).

        Jacques
---------------------------------------------------------------------------
Jacques Garrigue      Kyoto University     garrigue at kurims.kyoto-u.ac.jp
		<A HREF=http://wwwfun.kurims.kyoto-u.ac.jp/~garrigue/>JG</A>



  reply	other threads:[~2000-07-21  7:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-10 13:51 LablTk Fabien Fleutot
2000-07-21  0:42 ` Jacques Garrigue [this message]
2000-07-21  7:40   ` LablTk Fabien Fleutot
2000-07-21  8:36     ` LablTk Jacques Garrigue
2000-07-21  8:36   ` LablTk Axel Poigné
2001-01-25 16:28 LablTk wester
2001-01-29 14:03 ` LablTk 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=20000721094253L.garrigue@kurims.kyoto-u.ac.jp \
    --to=garrigue@kurims.kyoto-u.ac.jp \
    --cc=caml-list@inria.fr \
    --cc=fabien.fleutot@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).