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 XAA16600 for caml-red; Sun, 16 Jul 2000 23:57:55 +0200 (MET DST) 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 PAA27806 for ; Mon, 10 Jul 2000 15:51:20 +0200 (MET DST) Received: from faure.inria.fr (faure.inria.fr [128.93.12.23]) by concorde.inria.fr (8.10.0/8.10.0) with ESMTP id e6ADpJH19623 for ; Mon, 10 Jul 2000 15:51:19 +0200 (MET DST) Received: from inria.fr (localhost.inria.fr [127.0.0.1]) by faure.inria.fr (8.10.0/8.10.0) with ESMTP id e6ADpJx01397 for ; Mon, 10 Jul 2000 15:51:19 +0200 Message-ID: <3969D4D7.8001219E@inria.fr> Date: Mon, 10 Jul 2000 15:51:19 +0200 From: Fabien Fleutot Organization: INRIA X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: caml-list@inria.fr Subject: LablTk Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: weis@pauillac.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 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...