Datatip: fix help pages by checking the right pre-condition 28/17828/3
Clément DAVID [Mon, 29 Feb 2016 16:49:30 +0000 (17:49 +0100)]
Change-Id: I53c4c4541972bbed93e192de0bb911d9dce2a139

scilab/modules/graphics/macros/datatips/datatipMove.sci
scilab/modules/graphics/macros/datatips/datatipSetOrientation.sci

index d1978d4..8b50997 100644 (file)
@@ -17,8 +17,8 @@ function datatipMove(tip_handle,ax)
         error(msprintf(_("%s: Wrong number of input argument(s): At least %d expected.\n"),"datatipMove",1))
     end
 
-    if type(tip_handle)<>9|size(tip_handle,"*")<>1|or(tip_handle.type<>"Compound") then
-        error(msprintf(_("%s: Wrong type for input argument #%d: A ''%s'' handle expected.\n"),"datatipMove",1,"datatip"))
+    if type(tip_handle)<>9|size(tip_handle,"*")<>1|or(tip_handle.type<>"Datatip") then
+        error(msprintf(_("%s: Wrong type for input argument #%d: A ''%s'' handle expected.\n"),"datatipMove",1,"Datatip"))
     end
 
     if argn(2)==1 then
index 3cf59ca..4509f4e 100644 (file)
@@ -16,9 +16,9 @@ function datatipSetOrientation(tip_handle,o)
         "datatipSetOrientation",2))
     end
     orientations=["automatic" "upper left" "upper right", "lower left","lower right"]
-    if type(tip_handle)<>9|size(tip_handle,"*")<>1|or(tip_handle.type<>"Compound") then
+    if type(tip_handle)<>9|size(tip_handle,"*")<>1|or(tip_handle.type<>"Datatip") then
         error(msprintf(_("%s: Wrong type for input argument #%d: A ''%s'' handle expected.\n"),...
-        "datatipSetOrientation",1,"datatip"))
+        "datatipSetOrientation",1,"Datatip"))
     end
 
     if o == "upper left" then