~ubuntu-branches/ubuntu/karmic/ocaml-doc/karmic

« back to all changes in this revision

Viewing changes to examples/camltk/hello_quit.ml

  • Committer: Bazaar Package Importer
  • Author(s): Vanicat Rémi
  • Date: 2002-02-05 10:51:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020205105143-a061tunf8tev07ne
Tags: 3.04-4
* New debian maintainer
* Split doc-base file
* Move to non-free
* Change the copyright file to the copyright of the documentation
* remove FAQs (their license prohibit their redistribution)
* corrected the examples

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
open Tk;;
 
2
 
 
3
let action_press () = print_string "Bonjour!"; print_newline ();;
 
4
 
 
5
let hello_quit () =
 
6
  let fen�tre_principale = openTk () in
 
7
  let bouton_press =
 
8
    Button.create fen�tre_principale
 
9
                   [Text "Pressez-moi"; Command action_press] in
 
10
  let bouton_quit =
 
11
    Button.create fen�tre_principale
 
12
      [Text "Quittez-moi"; Command closeTk] in
 
13
  pack [bouton_press; bouton_quit] [Side Side_Left];
 
14
  mainLoop ();;
 
15
 
 
16
if !Sys.interactive then () else begin hello_quit(); exit 0 end;;