caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: <a9502276@unet.univie.ac.at>
To: caml-list@inria.fr
Subject: [Caml-list] labltk and ocaml 3.01
Date: Thu, 10 May 2001 11:38:55 +0200 (MSZ)	[thread overview]
Message-ID: <Pine.A41.3.96.1010510112810.168938A-100000@unet.univie.ac.at> (raw)

Hello!

I'm completely new to FP and Caml in particular.

I downloaded camltk417-2 and tried helloworld.ml:

administrator@NTWSW2KJH /cygdrive/d/Temp
$ labltk.exe helloworld.ml
File "helloworld.ml", line 9, characters 10-184:
Expecting function has type
  ?name:string ->
  ?activebackground:Tk.color ->
  ?activeforeground:Tk.color ->
  ?anchor:Tk.anchor ->
  ?background:Tk.color ->
  ?bitmap:Tk.bitmap ->
  ?borderwidth:int ->
  ?command:(unit -> unit) ->
  ?cursor:Tk.cursor ->
  ?disabledforeground:Tk.color ->
  ?font:string ->
  ?foreground:Tk.color ->
  ?height:int ->
  ?highlightbackground:Tk.color ->
  ?highlightcolor:Tk.color ->
  ?highlightthickness:int ->
  ?image:#Tk.image ->
  ?justify:Tk.justification ->
  ?padx:int ->
  ?pady:int ->
  ?relief:Tk.relief ->
  ?state:Tk.state ->
  ?takefocus:bool ->
  ?text:string ->
  ?textvariable:Textvariable.textVariable ->
  ?underline:int ->
  ?width:int -> ?wraplength:int -> Widget.button Widget.widget
This argument cannot be applied without label

and this is the example-program (i added the first line to meet my needs):

#directory "d:\programs\ocaml\lib\labltk";;
open Tk;;            (* Make interface functions available *)

let top = openTk ();;   (* Initialisation of the interface *)
(* top is now the toplevel widget *)

(* Widget initialisation *)
let b = Button.create top 
          [Text "foobar"; 
           Command (function () -> 
                      print_string "foobar"; 
                      print_newline();
                      flush stdout)];;
(* b exists but is not yet visible *)

let q = Button.create top 
          [Text "quit"; 
           Command closeTk];;
(* q exists but is not yet visible *)

pack [b; q][] ;;           (* Make b visible *)
mainLoop() ;;           (* User interaction*)
(* You can quit this program by deleting its main window *)


but for this example-program (and all the other labltk-examples) i get the
error "This argument cannot be applied without label"

I am running ocaml 3.01
Am i doing sthg wrong or are the example programms shiped with labltk
0.417 somewhat broken?

Thank you!

Johann

-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


             reply	other threads:[~2001-05-10  9:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-10  9:38 a9502276 [this message]
2001-05-10 10:02 ` 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=Pine.A41.3.96.1010510112810.168938A-100000@unet.univie.ac.at \
    --to=a9502276@unet.univie.ac.at \
    --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;
as well as URLs for NNTP newsgroup(s).