diff options
author | Pierre Weis <Pierre.Weis@inria.fr> | 2000-02-15 10:10:26 +0000 |
---|---|---|
committer | Pierre Weis <Pierre.Weis@inria.fr> | 2000-02-15 10:10:26 +0000 |
commit | 71524e3f5b7d886ea3fd56e583042a6df6eef307 (patch) | |
tree | 42d6b1f649e33d8205f817dc4d35a231c57cef8d /otherlibs/labltk/builtin/canvas_bind.ml | |
parent | 2fe1f4d4a015ba07268ba2df584d62f522ec2404 (diff) |
Incorporation des améliorations de la dernière version de ocamltk41,
en particulier gestion des alertes du compilateur Caml.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2819 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/labltk/builtin/canvas_bind.ml')
-rw-r--r-- | otherlibs/labltk/builtin/canvas_bind.ml | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/otherlibs/labltk/builtin/canvas_bind.ml b/otherlibs/labltk/builtin/canvas_bind.ml index ed646fe47..3f999b8aa 100644 --- a/otherlibs/labltk/builtin/canvas_bind.ml +++ b/otherlibs/labltk/builtin/canvas_bind.ml @@ -1,23 +1,21 @@ let bind :tag :events ?(:extend = false) ?(:breakable = false) ?(:fields = []) ?:action widget = - ignore begin - tkEval - [| cCAMLtoTKwidget widget; - TkToken "bind"; - cCAMLtoTKtagOrId tag; - cCAMLtoTKeventSequence events; - begin match action with None -> TkToken "" - | Some f -> - let cbId = - register_callback widget callback: (wrapeventInfo f fields) in - let cb = if extend then "+camlcb " else "camlcb " in - let cb = cb ^ cbId ^ writeeventField fields in - let cb = - if breakable then - cb ^ " ; if { $BreakBindingsSequence == 1 } then { break ;}" - ^ " ; set BreakBindingsSequence 0" - else cb in - TkToken cb - end - |] - end + tkCommand + [| cCAMLtoTKwidget widget; + TkToken "bind"; + cCAMLtoTKtagOrId tag; + cCAMLtoTKeventSequence events; + begin match action with None -> TkToken "" + | Some f -> + let cbId = + register_callback widget callback: (wrapeventInfo f fields) in + let cb = if extend then "+camlcb " else "camlcb " in + let cb = cb ^ cbId ^ writeeventField fields in + let cb = + if breakable then + cb ^ " ; if { $BreakBindingsSequence == 1 } then { break ;}" + ^ " ; set BreakBindingsSequence 0" + else cb in + TkToken cb + end + |] |