[Sciviews-commits] r350 - komodo/SciViews-K/content/js

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jan 25 19:47:26 CET 2011


Author: prezez
Date: 2011-01-25 19:47:26 +0100 (Tue, 25 Jan 2011)
New Revision: 350

Modified:
   komodo/SciViews-K/content/js/r.js
Log:
sv.r.run, sv.r.source - minor fixes

Modified: komodo/SciViews-K/content/js/r.js
===================================================================
--- komodo/SciViews-K/content/js/r.js	2011-01-24 13:51:10 UTC (rev 349)
+++ komodo/SciViews-K/content/js/r.js	2011-01-25 18:47:26 UTC (rev 350)
@@ -381,7 +381,7 @@
 			while(currentLine < lineCount && !(text = oText.value.trim()))
 				scimoz.getLine(currentLine++, oText);
 			scimoz.gotoLine(currentLine);
-			text = oText.value;
+			text = oText.value.trim();
 		}
 
 		if(text) 	return(sv.r.eval(text));
@@ -454,8 +454,9 @@
 			var cmd = 'tryCatch(source("' + tempFile + '", encoding =' +
 			' "utf-8"), finally = {unlink("' + tempFile + '")});';
 
-			sv.cmdout.append(":>");
-			sv.r.evalHidden(cmd, true);
+			sv.r.evalCallback(cmd, function(ret) {
+				sv.cmdout.append(ret + "\n:>");
+			});
 		}
 	} catch(e) {
 		sv.log.exception(e, "Unknown error while sourcing R code in"



More information about the Sciviews-commits mailing list