Really remove x_message from Scilab 29/18529/3
Paul Bignier [Tue, 30 Aug 2016 08:49:22 +0000 (10:49 +0200)]
 * It's been obsoleted & removed a long time ago but there were still occurrences of it

Change-Id: I793976d96bb2d029432121fedcc49bfcc74ea166

scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/messagebox/SwingScilabMessageBox.java
scilab/modules/gui/src/java/org/scilab/modules/gui/messagebox/MessageBox.java
scilab/modules/gui/src/java/org/scilab/modules/gui/messagebox/ScilabMessageBox.java
scilab/modules/scicos/macros/scicos_scicos/scimihm.sci
scilab/modules/scicos_blocks/macros/Linear/DIFF_c.sci
scilab/modules/scicos_blocks/macros/Misc/CONSTRAINT2_c.sci
scilab/modules/scicos_blocks/macros/Misc/MPBLOCK.sci
scilab/modules/scicos_blocks/macros/NonLinear/LOOKUP2D.sci
scilab/modules/scicos_blocks/macros/NonLinear/LOOKUP_c.sci
scilab/modules/scicos_blocks/macros/PDE/PDE.sci

index 301fe6d..76cdaf8 100644 (file)
@@ -143,7 +143,7 @@ public class SwingScilabMessageBox extends JDialog implements SimpleMessageBox,
     private String[] userValues;
 
     /**
-     * Used for x_choose & x_message
+     * Used for x_choose
      */
     private String[] buttonsLabels;
     private int selectedButton;
index 8141765..51d5047 100644 (file)
@@ -19,7 +19,7 @@ import org.scilab.modules.gui.tab.SimpleTab;
 import org.scilab.modules.gui.uielement.UIElement;
 
 /**
- * Interface for Message Boxes used by Scilab functions such as x_message
+ * Interface for Message Boxes used by Scilab functions such as messagebox, message, ...
  * @author Vincent COUVERT
  */
 public interface MessageBox extends UIElement {
index ef570db..2b329af 100644 (file)
@@ -23,7 +23,7 @@ import org.scilab.modules.gui.utils.Size;
 import org.scilab.modules.gui.utils.UIElementMapper;
 
 /**
- * Interface for Message Boxes used by Scilab functions such as x_message
+ * Interface for Message Boxes used by Scilab functions such as messagebox, message, ...
  * @author Vincent COUVERT
  */
 public class ScilabMessageBox extends ScilabUIElement implements MessageBox {
index e378bfd..8b5ba4c 100644 (file)
@@ -25,7 +25,7 @@ function scimihm(%_xmlfile)
     %_winId=TCL_GetVar("IHMLoc");
 
     //if evstr(%_winId)>1 then
-    //  x_message("winId="+%_winId+" is graeter than 1 check your program");
+    //  messagebox("winId="+%_winId+" is greater than 1, check your program");
     //  return;
     //end
 
index 298879b..52dca02 100644 (file)
@@ -44,11 +44,11 @@ function [x,y,typ]=DIFF_c(job,arg1,arg2)
             xd0=xd0(:);
             Nxd=size(xd0,"*");
             if (N~=Nxd) then
-                message("Incompatible sizes: states and their derivatives should have the same size ")
+                messagebox("Incompatible sizes: states and their derivatives should have the same size")
                 ask_again=%t
             end
             if (N<=0 & ~ask_again) then
-                x_message("number of states must be > 0 ")
+                messagebox("Number of states must be > 0")
                 ask_again=%t
             end
 
index e0db95f..f672a22 100644 (file)
@@ -45,12 +45,12 @@ function [x,y,typ]=CONSTRAINT2_c(job,arg1,arg2)
             Nid=size(id,"*");
 
             if (N~=Nxd)|(N~=Nid) then
-                message("incompatible sizes, states, their derivatives, and ID should be the same size ")
+                messagebox("Incompatible sizes, states, their derivatives, and ID should be the same size")
                 ask_again=%t
             end
 
             if (N<=0 & ~ask_again) then
-                x_message("number of states (constraints) must be > 0 ")
+                messagebox("Number of states (constraints) must be > 0")
                 ask_again=%t
             end
 
@@ -58,7 +58,7 @@ function [x,y,typ]=CONSTRAINT2_c(job,arg1,arg2)
                 for i=1:N,
                     if ~((id(i)==0) | (id(i)==1)) then
                         ask_again=%t
-                        x_message(["Id(i) must be either";"0 when x''(i) is not present in the feedback";"1: when x''(i) is present in the feedback"])
+                        messagebox(["Id(i) must be either:";"0 when x''(i) is not present in the feedback";"1: when x''(i) is present in the feedback"])
                         break
                     end
                     if (id(i)==0) then
index a249e9b..9ccfc1b 100644 (file)
@@ -119,8 +119,8 @@ function [x,y,typ]=MPBLOCK(job,arg1,arg2)
 
             if ierr<>0 then
                 //You lose! Try again! Insert coin!
-                //x_message("Error, try again please!")
-                x_message("Error in evaluation of variables.")
+                //messagebox("Error, try again please!")
+                messagebox("Error in evaluation of variables.")
                 ok=%f
                 //break
             end
@@ -137,9 +137,9 @@ function [x,y,typ]=MPBLOCK(job,arg1,arg2)
                     end
                 end
                 if ~ok then
-                    x_message(["Invalid variable name for the input "+string(i)+".";
+                    messagebox(["Invalid variable name for the input "+string(i)+".";
                     """"+in(i)+"""";
-                    "Please choose another variable name."] );
+                    "Please choose another variable name."]);
                 end
             end
             //out
@@ -153,9 +153,9 @@ function [x,y,typ]=MPBLOCK(job,arg1,arg2)
                     end
                 end
                 if ~ok then
-                    x_message(["Invalid variable name for the output "+string(i)+".";
+                    messagebox(["Invalid variable name for the output "+string(i)+".";
                     """"+out(i)+"""";
-                    "Please choose another variable name."] );
+                    "Please choose another variable name."]);
                 end
             end
             //param
@@ -170,9 +170,9 @@ function [x,y,typ]=MPBLOCK(job,arg1,arg2)
                     end
                 end
                 if ~ok then
-                    x_message(["Invalid variable name for the parameter "+string(i)+".";
+                    messagebox(["Invalid variable name for the parameter "+string(i)+".";
                     """"+param(i)+"""";
-                    "Please choose another variable name."] );
+                    "Please choose another variable name."]);
                 end
             end
 
@@ -182,7 +182,7 @@ function [x,y,typ]=MPBLOCK(job,arg1,arg2)
                 for i=1:size(intype,"*")
                     if intype(i)<>"E"&intype(i)<>"I" then
                         //typeok=%f;
-                        x_message("Input type should be ''E'' or ''I''!");
+                        messagebox("Input type should be ''E'' or ''I''!");
                         ok=%f
                         break
                     end
@@ -197,7 +197,7 @@ function [x,y,typ]=MPBLOCK(job,arg1,arg2)
                 for i=1:size(outtype,"*")
                     if outtype(i)<>"E"&outtype(i)<>"I" then
                         //typeok=%f;
-                        x_message("Output type should be ''E'' or ''I''!");
+                        messagebox("Output type should be ''E'' or ''I''!");
                         ok=%f
                         break
                     end
@@ -208,7 +208,7 @@ function [x,y,typ]=MPBLOCK(job,arg1,arg2)
             //cross size checking
             if ok then
                 if or(size(intype)<>size(in)) then
-                    x_message("Input variables are not well defined!");
+                    messagebox("Input variables are not well defined!");
                     ok=%f
                     //break;
                 end
@@ -216,7 +216,7 @@ function [x,y,typ]=MPBLOCK(job,arg1,arg2)
 
             if ok then
                 if or(size(outtype)<>size(out)) then
-                    x_message("Output variables are not well defined!");
+                    messagebox("Output variables are not well defined!");
                     ok=%f
                     //break;
                 end
@@ -226,9 +226,8 @@ function [x,y,typ]=MPBLOCK(job,arg1,arg2)
             if ok then
                 pprop = pprop(:)
                 if (size(param,"*")<>size(pprop,"*")) then
-                    x_message(["There is differences in";
-                    "size of param and size ";
-                    "of param properties." ])
+                    messagebox(["There are differences in size of param";
+                    "and size of param properties."])
                     ok=%f
                     //break;
                 end
@@ -236,10 +235,10 @@ function [x,y,typ]=MPBLOCK(job,arg1,arg2)
 
             if ok then
                 if max(pprop)>2 | min(pprop)<0 then
-                    x_message(["Parameters properties must be :";
-                    "0 : if it is a paramaters";
-                    "1 : if it is an initial value of state,";
-                    "2 : it it is a fixed initial state value." ])
+                    messagebox(["Parameters properties must be:";
+                    "0: if it is a paramater,";
+                    "1: if it is an initial value of state,";
+                    "2: it it is a fixed initial state value."])
                     ok=%f
                     //break;
                 end
@@ -248,7 +247,7 @@ function [x,y,typ]=MPBLOCK(job,arg1,arg2)
             //check name of modelica file
             if ok then
                 if funam=="" then
-                    x_message("The model name is not defined!")
+                    messagebox("The model name is not defined!")
                     ok=%f
                     //break
                 end
@@ -257,7 +256,7 @@ function [x,y,typ]=MPBLOCK(job,arg1,arg2)
             if ok then
                 [dirF,nameF,extF]=fileparts(funam);
                 if (extF<>"" )|(dirF<>"") then
-                    x_message("Invalid model name!")
+                    messagebox("Invalid model name!")
                     ok=%f
                     //break
                 end
index 62df228..63c86be 100644 (file)
@@ -68,21 +68,21 @@ function [x,y,typ]=LOOKUP2D(job,arg1,arg2)
                 [ny,my]=size(yy);
                 [nz,mz]=size(zz);
                 if ((nx<=1)|(ny<=1)) then,
-                    x_message("input row/column data size should be greater than one");
+                    messagebox("Input row/column data size should be greater than one");
                     Ask_again=%t;
                 end
                 if ~((nx==nz)&(ny==mz)) then,
-                    x_message("incompatible size of x and y");
+                    messagebox("Incompatible size of x and y");
                     Ask_again=%t;
                 end
                 [ok]=test_increasing(xx);
                 if (~ok) then
-                    x_message("Row input values must be monotonically increasing");
+                    messagebox("Row input values must be monotonically increasing");
                     Ask_again=%t;
                 end
                 [ok]=test_increasing(yy);
                 if (~ok) then
-                    x_message("Column input values must be monotonically increasing");
+                    messagebox("Column input values must be monotonically increasing");
                     Ask_again=%t;
                 end
             end
index bef8e61..d68148a 100644 (file)
@@ -81,7 +81,7 @@ function [x,y,typ]=LOOKUP_c(job,arg1,arg2)
                 [nx,mx]=size(xx);
                 [ny,my]=size(yy);
                 if ~((nx==ny)&(mx==my)) then,
-                    x_message("incompatible size of x and y");
+                    messagebox("Incompatible size of x and y");
                     Ask_again=%t;
                 end
             end
@@ -645,7 +645,7 @@ function [rpar,ipar,ok]=poke_point(ixy,iparin,rparin)
             t3="Mouse-left double click: edit a point''s coordinates"
             t4="Mouse-left button press/drag/release: move a  point"
             t5="Change the window size: ''Data'' menu -> ''Databounds''"
-            x_message([t1;t2;t3;t4;t5]);
+            messagebox([t1;t2;t3;t4;t5]);
             //---------------------------------------------------------------
         case "Load from Excel" then
             [tok,xytt]=ReadExcel()
index 075465f..180770e 100644 (file)
@@ -63,7 +63,7 @@ function [x,y,typ]=PDE(job,arg1,arg2)
             ok1=%t;
             while %t do
                 [okk,rdnom,lab]=scicos_getvalue("PLEASE, GIVE US THE BLOCK''s NAME. ",..
-                "New block''s name :",list("str",1),label(3));
+                "New block''s name: ",list("str",1),label(3));
 
                 if okk==%f then
                     ok1=%f;
@@ -72,7 +72,7 @@ function [x,y,typ]=PDE(job,arg1,arg2)
                 label(3)=lab;
                 rdnom=stripblanks(rdnom);
                 if rdnom==emptystr() then
-                    ok1=%f;x_message("sorry C file name not defined");
+                    ok1=%f;messagebox("Sorry, C file name not defined.");
                 end
                 if ok1 then
                     break,
@@ -93,7 +93,7 @@ function [x,y,typ]=PDE(job,arg1,arg2)
                     elseif (signe == 0) then,
                         delta=0;
                     else
-                        x_message(["le discriminant n''est pas constant,"; "Vous devez choisir son signe dans l''IHM"]);
+                        messagebox(["The discriminant isn''t constant,"; "You must choose its sign in the GUI"]);
                         return;
                     end
                 else