caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] labltk and ocaml 3.01
@ 2001-05-10  9:38 a9502276
  2001-05-10 10:02 ` Jacques Garrigue
  0 siblings, 1 reply; 2+ messages in thread
From: a9502276 @ 2001-05-10  9:38 UTC (permalink / raw)
  To: caml-list

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-05-10 10:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-10  9:38 [Caml-list] labltk and ocaml 3.01 a9502276
2001-05-10 10:02 ` Jacques Garrigue

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).