[Sciviews-commits] r415 - komodo/SciViews-K-dev/content/js
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Dec 12 23:15:34 CET 2011
Author: prezez
Date: 2011-12-12 23:15:34 +0100 (Mon, 12 Dec 2011)
New Revision: 415
Modified:
komodo/SciViews-K-dev/content/js/commands.js
Log:
SciViews-K-dev: commands.js: fixed a bug in with R-Tk-gui
Modified: komodo/SciViews-K-dev/content/js/commands.js
===================================================================
--- komodo/SciViews-K-dev/content/js/commands.js 2011-12-12 22:14:34 UTC (rev 414)
+++ komodo/SciViews-K-dev/content/js/commands.js 2011-12-12 22:15:34 UTC (rev 415)
@@ -128,7 +128,7 @@
// do something here...
sv.cmdout.message("SciViews-R is closed with code" + exitCode, 2000, true);
_this.updateRStatus(false);
- alert("R is closed with code " + exitCode);
+ //alert("R is closed with code " + exitCode);
}
this.startR = function () {
@@ -149,6 +149,7 @@
var isWin = navigator.platform.indexOf("Win") === 0;
var id = sv.pref.getPref("svRApplication",
isWin? "r-gui" : "r-terminal");
+ var env = [];
switch (id) {
case "r-tk":
env.push("Rid=R-tk");
@@ -172,13 +173,13 @@
var process;
if(runInConsole) {
// XXX: This does not return a process!
- runSvc.Run(cmd, rDir, "", runInConsole, null);
+ runSvc.Run(cmd, rDir, env.join("\n"), runInConsole, null);
process = null;
// Observe = 'status_message'
// subject.category = "run_command"
// subject.msg = "'%s' returned %s." % (command, retval)
} else {
- process = runSvc.RunAndNotify(cmd, rDir, "", null);
+ process = runSvc.RunAndNotify(cmd, rDir, env.join("\n"), null);
// Observe = 'run_terminated'
// subject = child
// data = command
@@ -520,29 +521,29 @@
.filter(function(x) (x.file.ext.toLowerCase() == ".r"))
.map(function(x) x.file.path);
if (!files.length) return;
- var cmd = files.map(function(x) "source('" +
+ var cmd = files.map(function(x) "source('" +
sv.tools.string.addslashes(x) +"')" ).join("\n");
sv.rconn.eval(cmd, null, false);
},
get anyRFilesSelected()
- ko.places.manager.getSelectedItems().some(function(x)
+ ko.places.manager.getSelectedItems().some(function(x)
x.file.ext.toLowerCase() == ".r"),
-
+
loadSelection: function sv_loadPlacesSelection() {
var files = ko.places.manager.getSelectedItems()
.filter(function(x) (x.file.ext.toLowerCase() == ".rdata"))
.map(function(x) x.file.path);
if (!files.length) return;
- var cmd = files.map(function(x) "load('" +
+ var cmd = files.map(function(x) "load('" +
sv.tools.string.addslashes(x) +"')" ).join("\n");
sv.rconn.eval(cmd, null, false);
},
-
+
get anyRDataFilesSelected()
ko.places.manager.getSelectedItems().some(
function(x) x.file.ext.toLowerCase() == ".rdata")
-
+
}
//}
More information about the Sciviews-commits
mailing list