summaryrefslogtreecommitdiffstats
path: root/otherlibs/labltk/example/calc.ml
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>1999-12-16 08:37:38 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>1999-12-16 08:37:38 +0000
commit607772a16356084f724b7b4d8f29907def715ff1 (patch)
tree207c813ba86751631a7970b3c424db9b481e537c /otherlibs/labltk/example/calc.ml
parentfd6165164bf3ca6631e3b2b12a0f25ba3f5dd97a (diff)
drastic clean up of the code. slice .cmo size by 2!
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2692 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/labltk/example/calc.ml')
-rw-r--r--otherlibs/labltk/example/calc.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/otherlibs/labltk/example/calc.ml b/otherlibs/labltk/example/calc.ml
index ca87ef59e..fe1485689 100644
--- a/otherlibs/labltk/example/calc.ml
+++ b/otherlibs/labltk/example/calc.ml
@@ -80,7 +80,7 @@ let m =
class calculator :parent = object
inherit calc () as calc
- val label = Label.create anchor:`E relief:`Sunken padx:(`Pix 10) parent
+ val label = Label.create anchor:`E relief:`Sunken padx:10 parent
val frame = Frame.create parent
initializer
@@ -93,8 +93,8 @@ class calculator :parent = object
in
Label.configure textvariable:variable label;
calc#set to:"0";
- bind parent events:[[],`KeyPress]
- action:(`Set([`Char],fun ev -> calc#command ev.ev_Char));
+ bind parent events:[`KeyPress] fields:[`Char]
+ action:(fun ev -> calc#command ev.ev_Char);
for i = 0 to Array.length m - 1 do
Grid.configure row:i buttons.(i)
done;