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 17:36:33 +0900	[thread overview]
Message-ID: <20000721173633H.garrigue@kurims.kyoto-u.ac.jp> (raw)
In-Reply-To: Your message of "Fri, 21 Jul 2000 09:40:49 +0200" <200007210740.e6L7enk29607@faure.inria.fr>

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

>    > - 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.
> 
> One can do it with ``Wm.withdraw''. This function exists in Labltk;
> the problem is to say it to use my own function rather than the
> standard delete function when the window destruction is requested by
> the Wm.

My mistake.
So your problem is how to bind the Destroy event, avoiding its actual
execution. And I don't know how it can be done; break does not work in
that specific case. Strangely enough, the window is only destroyed
after the script was executed, which gives you time to say to the user
that he has done something wrong, but there is no way to stop it.
Actually I would like to know, since I have uses for it.

>    If you really need this kind of power, you may consider switching to
>    GTK.
>
> ...as soon as it will be included in the standard OCaml
> distribution: I don't want people to have to download and install
> dozens of libs before being able to compile my soft, esp. on
> platforms other than linux.

Then you will have to stick to Tk, which is available on most platforms.
Having moving APIs in the standard distribution does not sound nice, and
LablGTK's API is not stable yet.

---------------------------------------------------------------------------
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 21:16 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 ` LablTk Jacques Garrigue
2000-07-21  7:40   ` LablTk Fabien Fleutot
2000-07-21  8:36     ` Jacques Garrigue [this message]
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=20000721173633H.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).