X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Flablgtk_gtkmathview%2Flablgtk-20000829_gtkmathview-0.2.0%2Ftest%2Ftest.ml;h=af65d7485db1b7f3ac27a9175a839177689f385a;hb=5a369548a2f04fb59b5cbb94526325aae9bf415a;hp=4f9af18e55a346b4599efa879e4b1f6ba311248d;hpb=cec552d90e27a296ce90bb4a18de1ce91a4f49a5;p=helm.git diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/test/test.ml b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/test/test.ml index 4f9af18e5..af65d7485 100644 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/test/test.ml +++ b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/test/test.ml @@ -9,15 +9,6 @@ (* Callbacks *) let jump node = let module M = Minidom in - print_string ("jump: " ^ - (match - M.node_get_attribute_ns node - (M.mDOMString_of_string "xlink") - (M.mDOMString_of_string "href") - with - None -> "DOES NOT WORKS (if you have clicked on the hyperlink)!!!!!" - | Some s -> M.string_of_mDOMString s - ) ^ "\n"); print_string ("jump: " ^ (match M.node_get_attribute node @@ -32,9 +23,12 @@ let jump node = let selection_changed node = let module M = Minidom in print_string ("selection_changed: " ^ - (match M.node_get_name node with - None -> "selection_changed on nothing" - | Some s -> "selection changed on " ^ M.string_of_mDOMString s + (match node with + None -> "selection_changed on nothing" + | Some node -> + match M.node_get_name node with + None -> "selection_changed on a node without name" + | Some s -> "selection changed on " ^ M.string_of_mDOMString s ) ^ "\n"); flush stdout ;; @@ -70,10 +64,9 @@ let load mathview () = let get_selection mathview () = let selection = -(* match !mathview#get_selection with + match !mathview#get_selection with None -> "NO SELECTION" | Some node -> -*) let node = !mathview#get_selection in match Minidom.node_get_name node with None -> "selection is on nothing" | Some s -> "selection is on " ^ Minidom.string_of_mDOMString s @@ -85,14 +78,13 @@ let get_selection mathview () = let set_selection mathview () = begin try -(* match !mathview#get_selection with + match !mathview#get_selection with None -> raise Not_found | Some node -> -*) let node = !mathview#get_selection in match Minidom.node_get_parent node with None -> raise Not_found | Some node -> - !mathview#set_selection node ; + !mathview#set_selection (Some node) ; print_string "set_selection: SEEMS TO WORK\n" with Not_found ->