[Sciviews-commits] r387 - komodo/SciViews-K/content/js komodo/SciViews-K/defaults pkg/svKomodo/R pkg/svMisc/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Aug 12 18:01:55 CEST 2011
Author: phgrosjean
Date: 2011-08-12 18:01:55 +0200 (Fri, 12 Aug 2011)
New Revision: 387
Modified:
komodo/SciViews-K/content/js/sciviews.js
komodo/SciViews-K/defaults/svKomodo_0.9-52.tar.gz
komodo/SciViews-K/defaults/svKomodo_0.9-52.zip
komodo/SciViews-K/defaults/svMisc_0.9-62.tar.gz
komodo/SciViews-K/defaults/svMisc_0.9-62.zip
pkg/svKomodo/R/svKomodo-internal.R
pkg/svMisc/R/captureAll.R
Log:
Temporary hacks for problems detected with 0.9.23:
- autoupdate of the R object explorer is inactivated in svKomodo
- try to unsplit output to see if it solves very slow output in RGui under Windows (it is fine on other platforms)
Modified: komodo/SciViews-K/content/js/sciviews.js
===================================================================
--- komodo/SciViews-K/content/js/sciviews.js 2011-08-10 02:07:09 UTC (rev 386)
+++ komodo/SciViews-K/content/js/sciviews.js 2011-08-12 16:01:55 UTC (rev 387)
@@ -1349,7 +1349,7 @@
sv.toggleById("cmd_historyForward", level<2);
sv.toggleById("cmd_historyRecentLocations", level<2);
sv.toggleById("cmd_showUnsavedChanges", level<3);
- sv.toggleById("cmd_saveProject", level<1);
+ //sv.toggleById("cmd_saveProject", level<1);
sv.toggleById("cmd_revertProject", level<2);
sv.toggleById("cmd_editProperties", level<1);
sv.toggleById("cmd_toolboxExportPackage", level<3);
Modified: komodo/SciViews-K/defaults/svKomodo_0.9-52.tar.gz
===================================================================
(Binary files differ)
Modified: komodo/SciViews-K/defaults/svKomodo_0.9-52.zip
===================================================================
(Binary files differ)
Modified: komodo/SciViews-K/defaults/svMisc_0.9-62.tar.gz
===================================================================
(Binary files differ)
Modified: komodo/SciViews-K/defaults/svMisc_0.9-62.zip
===================================================================
(Binary files differ)
Modified: pkg/svKomodo/R/svKomodo-internal.R
===================================================================
--- pkg/svKomodo/R/svKomodo-internal.R 2011-08-10 02:07:09 UTC (rev 386)
+++ pkg/svKomodo/R/svKomodo-internal.R 2011-08-12 16:01:55 UTC (rev 387)
@@ -4,21 +4,36 @@
#if (!is.null(serve)) {
# startSocketServer(port = as.integer(serve)[1])
## Create our SciViews task callback manager
- assignTemp(".svTaskCallbackManager", svTaskCallbackManager())
+
+ ## PhG: inactivated for now, because it makes problems in R!!!
+ #assignTemp(".svTaskCallbackManager", svTaskCallbackManager())
koInstall()
+ ## Temporary change of a few R options that make problem with SciViews
+ ## Do not use fancy quotes
+ assignTemp(".useFancyQuotes", getOption("useFancyQuotes"))
+ options(useFancyQuotes = FALSE)
+ ## Limit output to 999 items
+ assignTemp(".max.print", getOption("max.print"))
+ options(max.print = 999)
#}
}
.onUnload <- function (libpath)
{
+ ## Restore R options that preexisted
+ try(options(useFancyQuotes = getTemp(".useFancyQuotes", TRUE)),
+ silent = TRUE)
+ try(options(max.print = getTemp(".max.print", 99999)),
+ silent = TRUE)
+
#serve <- getOption("ko.serve")
#if (!is.null(serve) && "package:svSocket" %in% search())
# stopSocketServer(port = as.integer(serve)[1])
koUninstall()
## Remove the SciViews tesk callback manager
- removeTaskCallback("SV-taskCallbackManager")
- rmTemp(".svTaskCallbackManager")
+ try(removeTaskCallback("SV-taskCallbackManager"), silent = TRUE)
+ try(rmTemp(".svTaskCallbackManager"), silent = TRUE)
}
.packageName <- "svKomodo"
Modified: pkg/svMisc/R/captureAll.R
===================================================================
--- pkg/svMisc/R/captureAll.R 2011-08-10 02:07:09 UTC (rev 386)
+++ pkg/svMisc/R/captureAll.R 2011-08-12 16:01:55 UTC (rev 387)
@@ -71,8 +71,30 @@
}
res <- withVisible(eval(x, .GlobalEnv))
## Do we have result to print?
- if (inherits(res, "list") && res$visible)
- print(res$value)
+ if (inherits(res, "list") && res$visible) {
+ ## Printing is veeery slow on Windows when split = TRUE
+ ## => unsplit temporarily, and print twice instead!
+ #print(res$value)
+
+ if (split == TRUE) {
+ sink(type = "message")
+ sink(type = "output")
+ ## Print first to the console
+ try(print(res$value))
+ sink(tconn, type = "message")
+ sink(tconn, type = "output", split = FALSE)
+ ## Print a second time to the connection
+ try(print(res$value))
+ ## Resink with split = TRUE
+ sink(type = "message")
+ sink(type = "output")
+ sink(stdout(), type = "message")
+ sink(tconn, type = "output", split = TRUE)
+ } else {
+ ## This is the conventional way to do it
+ print(res$value)
+ }
+ }
return(res)
}
More information about the Sciviews-commits
mailing list