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 VAA08231 for caml-red; Sun, 4 Feb 2001 21:05:54 +0100 (MET) 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 QAA25931 for ; Fri, 2 Feb 2001 16:38:00 +0100 (MET) Received: from mailgw1.fhg.de (mailgw1.fhg.de [153.96.1.2]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f12FbwX23830 for ; Fri, 2 Feb 2001 16:37:59 +0100 (MET) Received: from ilt.fhg.de (ilt.ilt.fhg.de [153.96.180.2]) by mailgw1.fhg.de (8.11.1/8.11.1) with ESMTP id f12Fbsd22538 for ; Fri, 2 Feb 2001 16:37:54 +0100 (MET) Received: from eent230 (eelta136.llt.RWTH-Aachen.DE [137.226.47.136]) by ilt.fhg.de (8.9.3/8.9.3) with SMTP id QAA13795 for ; Fri, 2 Feb 2001 16:37:53 +0100 (MET) Message-Id: <200102021537.QAA13795@ilt.fhg.de> From: wester@ilt.fhg.de To: caml-list@inria.fr Date: Fri, 2 Feb 2001 16:37:54 +0100 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: LablTk problem Priority: normal X-mailer: Pegasus Mail for Win32 (v3.01d) Sender: weis@pauillac.inria.fr Hi, I want to make a little Tk application. I have a main frame, a menu frame with a menu button, a menu and a menu command. Within the menu frame there is also a button. Besides this I have a canvas. The button works, when pressing it, the application exits. But the menu command doesn't react at all. I also tried the demo.ml program in the otherlibs\labltk\example directory. Here the menu command doesn't work too. I run an ocamltop with libltk.cma linked in under WindowsNT. I would be very appreciative for help. With kind regards. Rolf Wester ------------------------------------------------------------------------------------------------------------ #directory "h:\programme\ocaml30\lib\labltk";; #labels true;; let mainWindow () = let top = Tk.openTk() in let menuFrame = Frame.create top ~width: 20 ~height: 20 ~background: `Red in Tk.pack ~side: `Top ~fill: `X [menuFrame]; let fileButton = Menubutton.create menuFrame ~text:"File" ~borderwidth:3 ~relief: `Groove in Tk.pack ~side: `Left [fileButton]; let fileMenu = Menu.create fileButton in Menu.add_command fileMenu ~label:"Exit..." ~command: (fun () -> closeTk ();); let exitButton = Button.create menuFrame ~text: "Exit" ~borderwidth:3 ~relief: `Ridge in Tk.pack ~side: `Right [exitButton]; bind ~events:[`ButtonPress] ~action: (fun ev -> closeTk ();) exitButton; let canvas = Canvas.create top ~width: 600 ~height: 400 ~background: `White in Tk.pack [canvas]; canvas;; let canvas = mainWindow ();; Tk.mainLoop ();; ------------------------------------- Rolf Wester wester@ilt.fhg.de