[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | a9502276@u... |
| Subject: | [Caml-list] labltk and ocaml 3.01 |
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