From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA28054; Wed, 1 Oct 2003 13:59:27 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 NAA17201 for ; Wed, 1 Oct 2003 13:59:26 +0200 (MET DST) Received: from huva.hittite.isp.9tel.net (huva.hittite.isp.9tel.net [62.62.156.28]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h91BxPH18434 for ; Wed, 1 Oct 2003 13:59:25 +0200 (MET DST) Received: from lanfeust (176.17.185.81.internet9tcollecte.9massy1-1-ro-bas-2.9tel.net [81.185.17.176]) by huva.hittite.isp.9tel.net (Postfix) with SMTP id 957A69BCB9 for ; Wed, 1 Oct 2003 13:59:23 +0200 (CEST) MIME-Version: 1.0 Message-Id: <3F7AC194.000003.04488@lanfeust> Date: Wed, 1 Oct 2003 13:59:16 +0200 (Paris, Madrid) Content-Type: Text/Plain X-Mailer: IncrediMail 2001 (2001177) From: "Vincent Barichard" X-FID: PLAINTXT-NONE-0000-0000-000000000000 X-FVER: 3.0 X-CNT: ; Content-Transfer-Encoding: quoted-printable X-Priority: 3 To: "CAML LIST" Subject: [Caml-list] self widget call in camltk X-Loop: caml-list@inria.fr X-Spam: no; 0.00; barichard:01 barichard:01 univ-angers:01 widget:01 labltk:01 gui:01 opentk:01 mainloop:01 closetk:01 labltk:01 command:98 command:98 configure:02 configure:02 camltk:04 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi all,=0D =0D I use labltk to build a gui for a programm where I need that a button b1 = can enable another button b2 and disable itself. For example :=0D =0D open Tk=0D =0D let top =3D openTk ();;=0D let b1 =3D Button.create top ~text:"b1" ~state:`Disabled=0D ~command:(fun _ -> Button.configure b2 ~state:`Active;=0D Button.configure b1 ~state:`Disabled);;=0D let b2 =3D Button.create top ~text:"b2"=0D ~command:(fun _ -> Button.configure b1 ~state:`Active;=0D Button.configure b2 ~state:`Disabled);;=0D =0D pack [b1;b2];;=0D mainLoop ();;=0D closeTk ();;=0D =0D #quit;;=0D =0D Obviously, this code doesn't work because b1 and b2 call themself. How ca= n I make it work ? Is there any solution to simulate cross reference in lablt= k ?=0D =0D Thanks for your help.=0D =0D Vincent ------------------- 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