[rkward-cvs] SF.net SVN: rkward-code:[4871] trunk/rkward/rkward/rbackend/rpackages/ rkward

tfry at users.sf.net tfry at users.sf.net
Sat Oct 4 11:43:05 UTC 2014


Revision: 4871
          http://sourceforge.net/p/rkward/code/4871
Author:   tfry
Date:     2014-10-04 11:43:04 +0000 (Sat, 04 Oct 2014)
Log Message:
-----------
Give an example for rk.embed.device(), and warn about embedding RK() windows.

Modified Paths:
--------------
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/public_graphics.R
    trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.embed.device.Rd

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/public_graphics.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/public_graphics.R	2014-10-04 11:42:13 UTC (rev 4870)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/public_graphics.R	2014-10-04 11:43:04 UTC (rev 4871)
@@ -139,9 +139,15 @@
 #'       always the case for \code{plot(...)} and similar commands, which will re-use an existing plot window, if available.
 #'
 #' @note \code{rk.embed.device()} will not work on all platforms (most importantly, not in most MacOSX binaries). Further, note that a captured
-#'       \code{X11()} or \code{Windows} device may look similar to an \code{RK()} device, but is actually a very different thing.
+#'       \code{X11()} or \code{Windows} device may look similar to an \code{RK()} device, but is actually a very different thing. Capturing a
+#'       window already "owned" by RKWard (importantly, \code{RK()} device windows) may lead to unexpected results, including crashes.
 #'
 #' @seealso \link{RK}
+#' @examples
+#' 
+#' ## Not run:
+#' rk.embed.device (grDevices::X11(title="X11 device window"))
+#' plot (rnorm (10))
 #'
 #' @export
 "rk.embed.device" <- function (expr) {

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.embed.device.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.embed.device.Rd	2014-10-04 11:42:13 UTC (rev 4870)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.embed.device.Rd	2014-10-04 11:43:04 UTC (rev 4871)
@@ -18,8 +18,14 @@
 }
 \note{
 \code{rk.embed.device()} will not work on all platforms (most importantly, not in most MacOSX binaries). Further, note that a captured
-      \code{X11()} or \code{Windows} device may look similar to an \code{RK()} device, but is actually a very different thing.
+      \code{X11()} or \code{Windows} device may look similar to an \code{RK()} device, but is actually a very different thing. Capturing a
+      window already "owned" by RKWard (importantly, \code{RK()} device windows) may lead to unexpected results, including crashes.
 }
+\examples{
+## Not run:
+rk.embed.device (grDevices::X11(title="X11 device window"))
+plot (rnorm (10))
+}
 \seealso{
 \link{RK}
 }





More information about the rkward-tracker mailing list