]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/lablgtkmathview/test/test.ml
* click signal changed: now the element argument is optional
[helm.git] / helm / DEVEL / lablgtkmathview / test / test.ml
index 4df59756e0ab25d9dd5595a8906769af24839fb4..ca9abd84bbab42645173c0b57e0a0347c5874fdf 100644 (file)
@@ -103,11 +103,14 @@ let rec action mathview (element : Gdome.element) =
        end
      | None -> assert false (* every element has a parent *)
 
-let click mathview (element : Gdome.element) _ =
+let click mathview (element : Gdome.element option) _ =
  let module G = Gdome in
-  if not (jump element) then
-  if not (mathview#action_toggle element) then
-   ()
+  match element with
+     None -> print_string "CLICKED ON NOTHING\n" ; flush stdout
+   | Some element ->
+      if not (jump element) then
+      if not (mathview#action_toggle element) then
+       ()
 ;;