Scipad 6.144
Francois Vogel [Thu, 22 May 2008 21:14:10 +0000 (21:14 +0000)]
 * Fixed bug 3037 (lasterror can produce multiline error messages)

scilab/modules/scipad/changelog.txt
scilab/modules/scipad/tcl/db_states.tcl
scilab/modules/scipad/tcl/filecommands.tcl
scilab/modules/scipad/tcl/msg_files/fr.msg
scilab/modules/scipad/tcl/scilabexec.tcl
scilab/modules/scipad/version.xml

index 5c4b3ef..46cdc87 100644 (file)
@@ -3298,3 +3298,7 @@ Francois VOGEL, 17/05/08
  * Added a saved preference switch for colorizing user functions
  * Fixed wrong encoding of fr.msg (since 6.139) - now UTF-8 again
  * version --> 6.143
+
+Francois VOGEL, 22/05/08
+ * Fixed bug 3037 (lasterror can produce multiline error messages)
+ * version --> 6.144
index 3b5b428..c6cb72b 100644 (file)
@@ -537,7 +537,7 @@ proc checkexecutionerror_bp {} {
                                  set errnum  \"+string(db_n)+\"; \
                                  set errline \"+string(db_l)+\"; \
                                  set errfunc \"\"\"+strsubst(db_func,\"\"\"\",\"\\\"\"\")+\"\"\"; \
-                                 set errmsg  \"\"\"+stripblanks(strsubst(db_str,\"\"\"\",\"\\\"\"\"))+\"\"\"; \
+                                 set errmsg  \"\"\"+stripblanks(strsubst(strcat(db_str,ascii(10)),\"\"\"\",\"\\\"\"\"))+\"\"\"; \
                                  if {\$errnum != 0} { \
                                      bell; \
                                      set errtext \[mc \"\"Error \"\"\]; \
index 71d330f..fc0c197 100644 (file)
@@ -605,6 +605,9 @@ proc doopenfunsource {keywtype nametoopen} {
             # for the same reason as above, simply issuing
             #   ScilabEval_lt "scipad(\"$filetoopen\")" "seq"
             # does not always work
+            # <TODO>: the line below does not need the ScilabEval(TCL_EvalStr...) construct
+            #         because there is no Scilab instruction inside
+            #         openfile $filetoopen      should be just enough - to be checked
             ScilabEval_lt "TCL_EvalStr(\"openfile \"\"$filetoopen\"\"\",\"scipad\");" "seq"
         }
         "userfun" {
index 0aabe70..0a9436e 100644 (file)
@@ -24,7 +24,7 @@
 # See the file scipad/license.txt
 #
 # Scipad texts in French by Francois Vogel
-# in sync at least with v6.127
+# in sync at least with v6.143
 
 
 # commons
index 5c92db8..6059c14 100644 (file)
@@ -392,21 +392,22 @@ proc scilaberror {funnameargs} {
     ScilabEval_lt  "TCL_SetVar(\"errnum\", string(db_n), \"scipad\");" "sync" "seq"
     ScilabEval_lt  "TCL_SetVar(\"errline\", string(db_l), \"scipad\");" "sync" "seq"
     ScilabEval_lt  "TCL_SetVar(\"errfunc\", strsubst(db_func,\"\"\"\",\"\\\"\"\"), \"scipad\")" "sync" "seq"
-    ScilabEval_lt  "TCL_SetVar(\"errmsg\" ,  strsubst( \
-                                                     strsubst( \
-                                                     strsubst( \
-                                                     strsubst( \
-                                                     strsubst( \
-                                                                db_str,\"\"\"\",\"\\\"\"\") \
-                                                                      ,\"''\",\"\\''\") \
-                                                                      ,\"$\",\"\\$\") \
-                                                                      ,\"\[\",\"\\\[\") \
-                                                                      ,\"\]\",\"\\\]\") \
-                                                    , \"scipad\" )" "sync" "seq"
+    ScilabEval_lt  "TCL_SetVar(\"errmsg\" , strsubst( \
+                                            strsubst( \
+                                            strsubst( \
+                                            strsubst( \
+                                            strsubst( \
+                                                       strcat(stripblanks(db_str),ascii(13)) \
+                                                             ,\"\"\"\",\"\\\"\"\") \
+                                                             ,\"''\",\"\\''\") \
+                                                             ,\"$\",\"\\$\") \
+                                                             ,\"\[\",\"\\\[\") \
+                                                             ,\"\]\",\"\\\]\") \
+                                          , \"scipad\" )" "sync" "seq"
     if {$ScilabErrorMessageBox} {
         tk_messageBox -title [mc "Scilab execution error"] \
-          -message [concat [mc "The shell reported an error while trying to execute "]\
-          $funnameargs [mc ": error "] $errnum ", " $errmsg ", " [mc "at line "]\
+          -message [append dummyvar [mc "The shell reported an error while trying to execute "]\
+          $funnameargs [mc ": error "] $errnum "\n" $errmsg "\n" [mc "at line "]\
           $errline [mc " of "] $errfunc]
     }
     showinfo [mc "Execution aborted!"]
index 0aa184e..f65d7a4 100644 (file)
@@ -15,5 +15,5 @@
 -->
 <!-- =================== -->
 
-<VERSION major="6" minor="143" maintenance="0" revision="0" string="SciPad unstable-svn" />
+<VERSION major="6" minor="144" maintenance="0" revision="0" string="SciPad unstable-svn" />
 </MODULE_VERSION>