From: "Vincent Barichard" <Vincent.Barichard@info.univ-angers.fr>
To: "CAML LIST" <caml-list@inria.fr>
Subject: [Caml-list] self widget call in camltk
Date: Wed, 1 Oct 2003 13:59:16 +0200 (Paris, Madrid) [thread overview]
Message-ID: <3F7AC194.000003.04488@lanfeust> (raw)
Hi all,
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 :
open Tk
let top = openTk ();;
let b1 = Button.create top ~text:"b1" ~state:`Disabled
~command:(fun _ -> Button.configure b2 ~state:`Active;
Button.configure b1 ~state:`Disabled);;
let b2 = Button.create top ~text:"b2"
~command:(fun _ -> Button.configure b1 ~state:`Active;
Button.configure b2 ~state:`Disabled);;
pack [b1;b2];;
mainLoop ();;
closeTk ();;
#quit;;
Obviously, this code doesn't work because b1 and b2 call themself. How can I
make it work ? Is there any solution to simulate cross reference in labltk ?
Thanks for your help.
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
next reply other threads:[~2003-10-01 11:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-01 11:59 Vincent Barichard [this message]
2003-10-01 23:54 ` 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=3F7AC194.000003.04488@lanfeust \
--to=vincent.barichard@info.univ-angers.fr \
--cc=caml-list@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