summaryrefslogtreecommitdiffstats
path: root/otherlibs/labltk/support/widget.ml
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2000-03-28 08:47:47 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2000-03-28 08:47:47 +0000
commitdb2e8dec76e17bd0987dd0a12ad7509b6e63d97c (patch)
tree65f6ec5acc0c6d9020f1fb5b0dcb32bd4fe8bca3 /otherlibs/labltk/support/widget.ml
parente3f1ab289da91f2d382afc824ade6c6e3b5eb764 (diff)
adapte aux labels legers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3005 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/labltk/support/widget.ml')
-rw-r--r--otherlibs/labltk/support/widget.ml14
1 files changed, 7 insertions, 7 deletions
diff --git a/otherlibs/labltk/support/widget.ml b/otherlibs/labltk/support/widget.ml
index 883d8624f..0ec71c09a 100644
--- a/otherlibs/labltk/support/widget.ml
+++ b/otherlibs/labltk/support/widget.ml
@@ -50,7 +50,7 @@ let forget_type w = (Obj.magic (w : 'a widget) : any widget)
let coe = forget_type
(* table of widgets *)
-let table = (Hashtbl.create size:401 : (string, any widget) Hashtbl.t)
+let table = (Hashtbl.create 401 : (string, any widget) Hashtbl.t)
let name = function
Untyped s -> s
@@ -75,13 +75,13 @@ let dummy =
Untyped "dummy"
let remove w =
- Hashtbl.remove table key:(name w)
+ Hashtbl.remove table (name w)
(* Retype widgets returned from Tk *)
(* JPF report: sometime s is "", see Protocol.cTKtoCAMLwidget *)
let get_atom s =
try
- Hashtbl.find table key:s
+ Hashtbl.find table s
with
Not_found -> Untyped s
@@ -103,7 +103,7 @@ let naming_scheme = [
"toplevel", "top" ]
-let widget_any_table = List.map fun:fst naming_scheme
+let widget_any_table = List.map f:fst naming_scheme
(* subtypes *)
let widget_button_table = [ "button" ]
and widget_canvas_table = [ "canvas" ]
@@ -123,7 +123,7 @@ and widget_toplevel_table = [ "toplevel" ]
let new_suffix clas n =
try
- (List.assoc key:clas naming_scheme) ^ (string_of_int n)
+ (List.assoc clas naming_scheme) ^ (string_of_int n)
with
Not_found -> "w" ^ (string_of_int n)
@@ -165,11 +165,11 @@ let check_class w clas =
match w with
Untyped _ -> () (* assume run-time check by tk*)
| Typed(_,c) ->
- if List.mem clas item:c then ()
+ if List.mem c clas then ()
else raise (IllegalWidgetType c)
(* Checking membership of constructor in subtype table *)
let chk_sub errname table c =
- if List.mem table item:c then ()
+ if List.mem c table then ()
else raise (Invalid_argument errname)