[Sciviews-commits] r236 - komodo/SciViews-K/content/js
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Dec 17 14:21:49 CET 2009
Author: prezez
Date: 2009-12-17 14:21:48 +0100 (Thu, 17 Dec 2009)
New Revision: 236
Modified:
komodo/SciViews-K/content/js/r.js
komodo/SciViews-K/content/js/socket.js
Log:
fixed: sv.pkg.install did not use repository set in Komodo options
Modified: komodo/SciViews-K/content/js/r.js
===================================================================
--- komodo/SciViews-K/content/js/r.js 2009-12-13 10:08:50 UTC (rev 235)
+++ komodo/SciViews-K/content/js/r.js 2009-12-17 13:21:48 UTC (rev 236)
@@ -1262,8 +1262,8 @@
// Break possible partial multiline command in R from previous session
// and indicate that we are in a new session now in the R console
// TODO: report if we load something or not
- sv.r.escape('cat("Session directory is now ' + dir.addslashes() +
- '\n", file = stderr())');
+ sv.r.escape('cat("Session directory is now", dQuote("' + dir.addslashes() +
+ '"), "\\n", file = stderr())');
// Refresh active objects support
// We most probably need to update the R Objects browser and active objs
@@ -1676,7 +1676,9 @@
var res = false;
var reset = repos === true;
- var defaultRepos = sv.prefs.getString("CRANMirror", "http://cran.r-project.org/");
+ var defaultRepos = sv.prefs.getString("CRANMirror");
+ if (defaultRepos == "None") defaultRepos = "";
+ //defaultRepos = "http://cran.r-project.org/";
function _installCallback() {
sv.r.pkg.install(pkgs, defaultRepos, true);
@@ -1720,7 +1722,8 @@
// then callback again
if (!pkgs && repos != "local") {
sv.cmdout.message(sv.translate("Listing available packages..."), 5000);
- res = sv.r.evalCallback('cat(available.packages()[,1], sep="' +
+ res = sv.r.evalCallback('cat(available.packages(contriburl=contrib.url("'
+ + repos + '", getOption("pkgType")))[,1], sep="' +
sv.r.sep + '")', function (pkgs) {
sv.cmdout.message("");
Modified: komodo/SciViews-K/content/js/socket.js
===================================================================
--- komodo/SciViews-K/content/js/socket.js 2009-12-13 10:08:50 UTC (rev 235)
+++ komodo/SciViews-K/content/js/socket.js 2009-12-17 13:21:48 UTC (rev 236)
@@ -179,6 +179,10 @@
var res = this.rClient(this.host, port, id + cmd + "\n",
listener, echo, echofun);
+ // BUG: (windows/linux?) if network connection is turned off while komodo is
+ // running, navigator.onLine is set to false, and we get an
+ // NS_ERROR_OFFLINE here, even if the socket connection with R is on:
+
// if exception was returned:
if (res && res.name && res.name == "NS_ERROR_OFFLINE") {
sv.cmdout.message("Error: R is unreachable (see log)", 5000, true);
More information about the Sciviews-commits
mailing list