[rkward-cvs] SF.net SVN: rkward-code:[4536] trunk/rkward/packages/rkwarddev

m-eik at users.sf.net m-eik at users.sf.net
Sat Feb 16 17:28:28 UTC 2013


Revision: 4536
          http://sourceforge.net/p/rkward/code/4536
Author:   m-eik
Date:     2013-02-16 17:28:26 +0000 (Sat, 16 Feb 2013)
Log Message:
-----------
rkwarddev: adding rk.XML.switch()  and fixing some problems

Modified Paths:
--------------
    trunk/rkward/packages/rkwarddev/ChangeLog
    trunk/rkward/packages/rkwarddev/DESCRIPTION
    trunk/rkward/packages/rkwarddev/NAMESPACE
    trunk/rkward/packages/rkwarddev/R/rk-internal.R
    trunk/rkward/packages/rkwarddev/R/rk.XML.component.R
    trunk/rkward/packages/rkwarddev/R/rk.XML.dependency_check.R
    trunk/rkward/packages/rkwarddev/R/rk.XML.optioncolumn.R
    trunk/rkward/packages/rkwarddev/R/rk.XML.pluginmap.R
    trunk/rkward/packages/rkwarddev/R/rk.paste.JS.graph.R
    trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R
    trunk/rkward/packages/rkwarddev/man/rk.XML.component.Rd
    trunk/rkward/packages/rkwarddev/man/rk.XML.dependency_check.Rd
    trunk/rkward/packages/rkwarddev/man/rk.XML.optioncolumn.Rd
    trunk/rkward/packages/rkwarddev/man/rk.XML.pluginmap.Rd
    trunk/rkward/packages/rkwarddev/man/rk.paste.JS.graph.Rd
    trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd

Added Paths:
-----------
    trunk/rkward/packages/rkwarddev/R/rk.XML.switch.R
    trunk/rkward/packages/rkwarddev/man/rk.XML.switch.Rd

Modified: trunk/rkward/packages/rkwarddev/ChangeLog
===================================================================
--- trunk/rkward/packages/rkwarddev/ChangeLog	2013-02-15 17:02:25 UTC (rev 4535)
+++ trunk/rkward/packages/rkwarddev/ChangeLog	2013-02-16 17:28:26 UTC (rev 4536)
@@ -10,6 +10,7 @@
   - rk.XML.pluginmap() will now move <dependencies> from <about> to a top level child node
     of plugin maps, with a warning
 added:
+  - new function rk.XML.switch()
   - new function rk.XML.optiondisplay()
   - new function rk.XML.optionset()
   - new function rk.XML.matrix()
@@ -18,6 +19,8 @@
   - added options "dependencies", "namespace" and "priority" to rk.XML.pluginmap()
   - added option "dependencies" to rk.XML.component()
   - added "map" to rk.XML.require()
+fixed:
+  - added some missing parameter in the docs for rk.paste.JS.graph()
 
 changes in version 0.06-1 (2012-11-08)
 changed:

Modified: trunk/rkward/packages/rkwarddev/DESCRIPTION
===================================================================
--- trunk/rkward/packages/rkwarddev/DESCRIPTION	2013-02-15 17:02:25 UTC (rev 4535)
+++ trunk/rkward/packages/rkwarddev/DESCRIPTION	2013-02-16 17:28:26 UTC (rev 4536)
@@ -6,8 +6,8 @@
 Depends:
     R (>= 2.9.0),methods,XiMpLe (>= 0.03-18),rkward (>= 0.5.6)
 Enhances: rkward
-Description: Provides functions to create plugin skeletons and XML structures
-    for RKWard.
+Description: Provides functions to create plugin skeletons and XML
+    structures for RKWard.
 License: GPL (>= 3)
 Encoding: UTF-8
 LazyLoad: yes
@@ -15,7 +15,7 @@
 Authors at R: c(person(given="Meik", family="Michalke",
     email="meik.michalke at hhu.de", role=c("aut", "cre")))
 Version: 0.06-2
-Date: 2013-02-15
+Date: 2013-02-16
 Collate:
     'echo.R'
     'id.R'
@@ -100,6 +100,7 @@
     'rk.XML.snippets.R'
     'rk.XML.spinbox.R'
     'rk.XML.stretch.R'
+    'rk.XML.switch.R'
     'rk.XML.tabbook.R'
     'rk.XML.text.R'
     'rk.XML.varselector.R'

Modified: trunk/rkward/packages/rkwarddev/NAMESPACE
===================================================================
--- trunk/rkward/packages/rkwarddev/NAMESPACE	2013-02-15 17:02:25 UTC (rev 4535)
+++ trunk/rkward/packages/rkwarddev/NAMESPACE	2013-02-16 17:28:26 UTC (rev 4536)
@@ -81,6 +81,7 @@
 export(rk.XML.snippets)
 export(rk.XML.spinbox)
 export(rk.XML.stretch)
+export(rk.XML.switch)
 export(rk.XML.tabbook)
 export(rk.XML.text)
 export(rk.XML.vars)

Modified: trunk/rkward/packages/rkwarddev/R/rk-internal.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk-internal.R	2013-02-15 17:02:25 UTC (rev 4535)
+++ trunk/rkward/packages/rkwarddev/R/rk-internal.R	2013-02-16 17:28:26 UTC (rev 4536)
@@ -542,19 +542,22 @@
 	components=c("component"),
 	context=c("menu", "!--"),
 	dialog=c("browser", "checkbox", "column", "copy",
-		"dropdown", "embed", "formula", "frame", "include", "input", "insert",
-		"preview", "radio", "row", "saveobject", "spinbox", "stretch", "tabbook",
+		"dropdown", "embed", "formula", "frame", "include", "input", "insert", "matrix",
+		"optionset", "preview", "radio", "row", "saveobject", "spinbox", "stretch", "tabbook",
 		"text", "varselector", "varslot", "!--"),
 	hierarchy=c("menu", "!--"),
-	logic=c("connect", "convert","include","insert","external","set","script"),
+	logic=c("connect", "convert", "dependency_check", "external", "include", "insert",
+		"script", "set", "switch"),
 	menu=c("entry", "menu", "!--"),
+	optionset=c("content", "logic", "optioncolumn"),
 	page=c("browser", "checkbox", "column", "copy",
-		"dropdown", "formula", "frame", "input", "page", "radio", "row", "saveobject",
-		"spinbox", "stretch", "tabbook", "text", "varselector", "varslot", "!--"),
+		"dropdown", "formula", "frame", "input", "matrix", "optionset", "page", "radio",
+		"row", "saveobject", "spinbox", "stretch", "tabbook", "text", "varselector",
+		"varslot", "!--"),
 	settings=c("setting", "caption", "!--"),
 	wizard=c("browser", "checkbox", "column", "copy",
-		"dropdown", "embed", "formula", "frame", "include", "input", "insert",
-		"page", "preview", "radio", "row", "saveobject", "spinbox", "stretch",
+		"dropdown", "embed", "formula", "frame", "include", "input", "insert", "matrix",
+		"optionset", "page", "preview", "radio", "row", "saveobject", "spinbox", "stretch",
 		"tabbook", "text", "varselector", "varslot", "!--")
 ) ## end list with valid child nodes
 

Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.component.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.component.R	2013-02-15 17:02:25 UTC (rev 4535)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.component.R	2013-02-16 17:28:26 UTC (rev 4536)
@@ -14,7 +14,7 @@
 #' @export
 #' @seealso
 #'		\code{\link[rkwarddev:rk.XML.components]{rk.XML.components}},
-#'		\code{\link[XiMpLe:rk.XML.dependencies]{rk.XML.dependencies}},
+#'		\code{\link[rkwarddev:rk.XML.dependencies]{rk.XML.dependencies}},
 #'		and the \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard}
 #' @examples
 #' test.component <- rk.XML.component("My GUI dialog", "plugins/MyGUIdialog.xml")

Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.dependency_check.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.dependency_check.R	2013-02-15 17:02:25 UTC (rev 4535)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.dependency_check.R	2013-02-16 17:28:26 UTC (rev 4536)
@@ -25,6 +25,7 @@
 #' @seealso \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard}
 #' @examples
 #' dependency_check.node <- rk.XML.dependency_check(
+#' 	id.name="dep_check",
 #' 	dependencies=list(
 #' 		rkward.min="0.5.3",
 #' 		rkward.max="",

Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.optioncolumn.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.optioncolumn.R	2013-02-15 17:02:25 UTC (rev 4535)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.optioncolumn.R	2013-02-16 17:28:26 UTC (rev 4536)
@@ -10,14 +10,14 @@
 #'		class XiMpLe.node (whose \code{id} will be extracted and used). For external \code{<optioncolumn>}s, the corresponding value will
 #'		be set to the externally set value. For regular (non-external) \code{<optioncolumn>}s, the corresponding row of the \code{<optioncolumn>} property, will be set
 #'		when the property changes inside the content-area.
-#' @param property Character string, the actual property to connect to, will be appended to the \code{id} of \code{connect}.
+#' @param modifier Character string, the modifier of the property to connect to, will be appended to the \code{id} of \code{connect}.
 #' @param default Character string, only for external columns: The value to assume for this column, if no value is known for an entry. Rarely useful.
 #' @return An object of class \code{XiMpLe.node}.
 #' @export
 #' @examples
 #' myInput <- rk.XML.input(label="Given name(s)", size="small")
-#' myOptCol <- rk.XML.optioncolumn("os_name", connect=myInput, property="text")
-rk.XML.optioncolumn <- function(id.name, label=TRUE, external=FALSE, connect=NULL, property=NULL, default=NULL){
+#' myOptCol <- rk.XML.optioncolumn("os_name", connect=myInput, modifier="text")
+rk.XML.optioncolumn <- function(id.name, label=TRUE, external=FALSE, connect=NULL, modifier=NULL, default=NULL){
 
 	attr.list <- list(id=id.name)
 
@@ -40,10 +40,10 @@
 		# let's see if we need to extract IDs first
 		connect.id <- check.ID(connect)
 		# if connect is an XML node, append 
-		if(is.XiMpLe.node(connect) && !is.null(property)){
+		if(is.XiMpLe.node(connect) && !is.null(modifier)){
 			# validate get modifier
-			if(modif.validity(connect, modifier=property)){
-				connect.id <- paste(connect.id, property, sep=".")
+			if(modif.validity(connect, modifier=modifier)){
+				connect.id <- paste(connect.id, modifier, sep=".")
 			} else {}
 		} else {}
 		attr.list[["connect"]] <- as.character(connect.id)

Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.pluginmap.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.pluginmap.R	2013-02-15 17:02:25 UTC (rev 4535)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.pluginmap.R	2013-02-16 17:28:26 UTC (rev 4536)
@@ -24,7 +24,7 @@
 #' @param gen.info Logical, if \code{TRUE} a comment note will be written into the document,
 #'		that it was generated by \code{rkwarddev} and changes should be done to the script.
 #' @param dependencies An object of class \code{XiMpLe.node} to be pasted as the \code{<dependencies>} section,
-#'		See \code{\link[XiMpLe:rk.XML.dependencies]{rk.XML.dependencies}} for details. Skipped if \code{NULL}.
+#'		See \code{\link[rkwarddev:rk.XML.dependencies]{rk.XML.dependencies}} for details. Skipped if \code{NULL}.
 #' @param namespace Character string, the namespace attribute of the \code{<document>} node, defaults to the plugin name (which you probably shouldn't touch...)
 #' @param priority Character string, the priority attribute of the \code{<document>} node. Must be either "hidden", "low", "medium", or "high",
 #'		defaults to "medium".

Added: trunk/rkward/packages/rkwarddev/R/rk.XML.switch.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.switch.R	                        (rev 0)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.switch.R	2013-02-16 17:28:26 UTC (rev 4536)
@@ -0,0 +1,100 @@
+#' Create XML node "switch" for RKWard plugins
+#'
+#' This node can only be used in \code{<logic>} sections. If the provided property
+#' is logical, you must also set values for \code{true} and \code{false}. If not,
+#' you must provide at least one \code{case}.
+#' 
+#' The values to be returned can be either \code{fixed_value} or \code{dynamic_value}.
+#' A \code{fixed_value} must be a character string which will be returned if the condition
+#' is met. Whereas a \code{dynamic_value} is the \code{id} of another property, an can
+#' be provided as either a character string or an object of class \code{XiMpLe.node}.
+#'
+#' @param condition Either a character string (the \code{id} of the property whose
+#'		state should be queried), or an object of class \code{XiMpLe.node}
+#'		(whose \code{id} will be extracted and used).
+#' @param modifier Character string, an optional modifier to be appended tp \code{condition}.
+#' @param true A named list, setting the return value if \code{condition} is TRUE.
+#'		Must have either \code{fixed_value} or \code{dynamic_value}.
+#' @param false A named list, setting the return value if \code{condition} is FALSE.
+#'		Must have either \code{fixed_value} or \code{dynamic_value}.
+#' @param case A list of named lists, setting the return values if \code{condition == case}.
+#'		Each vector represents one case; it must include a character string called \code{standard},
+#'		which is the value to match against, as well as either \code{fixed_value} or
+#'		\code{dynamic_value}.
+#' @param default A named list, setting the default return value if \code{condition}
+#'		doesn't match any case. Must have either \code{fixed_value} or
+#'		\code{dynamic_value}.
+#' @param id.name Character string, a unique ID for this property.
+#'		If \code{"auto"}, IDs will be generated automatically from the condition ID.
+#' @return An object of class \code{XiMpLe.node}.
+#' @export
+#' @seealso
+#'		\href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard}
+#' @examples
+#' myCheckbox <- rk.XML.cbox("foo")
+#' rk.XML.switch(myCheckbox,
+#'   true=c(fixed_value="foo"),
+#'   false=list(fixed_value="bar")
+#' )
+rk.XML.switch <- function(condition, modifier=NULL, true=NULL, false=NULL,
+	case=NULL, default=NULL, id.name="auto"){
+
+	condition.id <- check.ID(condition)
+	if(is.XiMpLe.node(condition) && !is.null(modifier)){
+		# validate modifier
+		if(modif.validity(condition, modifier=modifier)){
+			condition.id <- paste(condition.id, modifier, sep=".")
+		} else {}
+	} else {}
+
+	if(identical(id.name, "auto")){
+		attr.list <- list(condition=condition.id, id=auto.ids(condition.id, prefix=ID.prefix("switch")))
+	} else if(!is.null(id.name)){
+		attr.list <- list(condition=condition.id, id=id.name)
+	} else {
+		stop(simpleError("'id.name' must have a value!"))
+	}
+
+	check.required.attrs <- function(obj, req=c("fixed_value", "dynamic_value")){
+			# some sanity check here
+			if(!any(req %in% names(obj))){
+				stop(simpleError("Check your attributes!"))
+			} else {}
+		}
+
+	# does also check for the required default attributes
+	check.dyn.value <- function(condCase){
+			check.required.attrs(obj=condCase)
+			if("dynamic_value" %in% names(condCase)){
+				condCase[["dynamic_value"]] <- check.ID(condCase[["dynamic_value"]])
+			} else {}
+			return(condCase)
+		}
+
+	child.nodes <- list()
+	if(!is.null(true) && !is.null(false)){
+		true <- check.dyn.value(true)
+		false <- check.dyn.value(false)
+		child.nodes <- append(child.nodes, XMLNode("true", attrs=true))
+		child.nodes <- append(child.nodes, XMLNode("false", attrs=false))
+	} else if(!is.null(case)){
+		for (thisNode in case){
+			check.required.attrs(thisNode, req="standard")
+			thisNode <- check.dyn.value(thisNode)
+			child.nodes <- append(child.nodes, XMLNode("case", attrs=thisNode))
+		}
+		if(!is.null(default)){
+			default <- check.dyn.value(default)
+			child.nodes <- append(child.nodes, XMLNode("default", attrs=default))
+		} else {}
+	} else {
+		stop(simpleError("Please either provide both 'true' and 'false', or 'case'!"))
+	}
+
+	node <- XMLNode("switch",
+		attrs=attr.list,
+		.children=child.nodes)
+
+	return(node)
+
+}

Modified: trunk/rkward/packages/rkwarddev/R/rk.paste.JS.graph.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.paste.JS.graph.R	2013-02-15 17:02:25 UTC (rev 4535)
+++ trunk/rkward/packages/rkwarddev/R/rk.paste.JS.graph.R	2013-02-16 17:28:26 UTC (rev 4536)
@@ -14,6 +14,10 @@
 #' @param printoutObj An \code{rk.JS.var} object fetching the \code{"code.printout"} modifier of \code{plotOpts}
 #'		(see examples below!). If \code{NULL} and \code{plotOpts} is of class \code{rk.plot.opts} (as returned by \code{rk.plotOptions}),
 #'		will be fetched from \code{plotOpts} automatically.
+#' @param level Integer, which indentation level to use, minimum is 1.
+#' @param indent.by A character string defining the indentation string to use.
+#' @param empty.e For \code{rk.JS.ite} objects only: Logical, if \code{TRUE} will force to add empty \code{else \{\}} brackets when
+#'		there is no \code{else} statement defined, which is considered to enhance code readability by some.
 #' @return A character string.
 #' @export
 #' @seealso

Modified: trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R	2013-02-15 17:02:25 UTC (rev 4535)
+++ trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R	2013-02-16 17:28:26 UTC (rev 4536)
@@ -4,7 +4,7 @@
 #' Package: \tab rkwarddev\cr
 #' Type: \tab Package\cr
 #' Version: \tab 0.06-2\cr
-#' Date: \tab 2013-02-15\cr
+#' Date: \tab 2013-02-16\cr
 #' Depends: \tab R (>= 2.9.0),methods,XiMpLe (>= 0.03-18),rkward (>= 0.5.6)\cr
 #' Enhances: \tab rkward\cr
 #' Encoding: \tab UTF-8\cr

Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.component.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.component.Rd	2013-02-15 17:02:25 UTC (rev 4535)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.component.Rd	2013-02-16 17:28:26 UTC (rev 4536)
@@ -37,7 +37,7 @@
 }
 \seealso{
   \code{\link[rkwarddev:rk.XML.components]{rk.XML.components}},
-  \code{\link[XiMpLe:rk.XML.dependencies]{rk.XML.dependencies}},
+  \code{\link[rkwarddev:rk.XML.dependencies]{rk.XML.dependencies}},
   and the \href{help:rkwardplugins}{Introduction to Writing
   Plugins for RKWard}
 }

Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.dependency_check.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.dependency_check.Rd	2013-02-15 17:02:25 UTC (rev 4535)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.dependency_check.Rd	2013-02-16 17:28:26 UTC (rev 4536)
@@ -38,6 +38,7 @@
 }
 \examples{
 dependency_check.node <- rk.XML.dependency_check(
+	id.name="dep_check",
 	dependencies=list(
 		rkward.min="0.5.3",
 		rkward.max="",

Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.optioncolumn.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.optioncolumn.Rd	2013-02-15 17:02:25 UTC (rev 4535)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.optioncolumn.Rd	2013-02-16 17:28:26 UTC (rev 4536)
@@ -3,7 +3,7 @@
 \title{Create XML node "optioncolumn" for RKWard plugins}
 \usage{
   rk.XML.optioncolumn(id.name, label = TRUE,
-    external = FALSE, connect = NULL, property = NULL,
+    external = FALSE, connect = NULL, modifier = NULL,
     default = NULL)
 }
 \arguments{
@@ -30,9 +30,9 @@
   property, will be set when the property changes inside
   the content-area.}
 
-  \item{property}{Character string, the actual property to
-  connect to, will be appended to the \code{id} of
-  \code{connect}.}
+  \item{modifier}{Character string, the modifier of the
+  property to connect to, will be appended to the \code{id}
+  of \code{connect}.}
 
   \item{default}{Character string, only for external
   columns: The value to assume for this column, if no value
@@ -47,6 +47,6 @@
 }
 \examples{
 myInput <- rk.XML.input(label="Given name(s)", size="small")
-myOptCol <- rk.XML.optioncolumn("os_name", connect=myInput, property="text")
+myOptCol <- rk.XML.optioncolumn("os_name", connect=myInput, modifier="text")
 }
 

Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.pluginmap.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.pluginmap.Rd	2013-02-15 17:02:25 UTC (rev 4535)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.pluginmap.Rd	2013-02-16 17:28:26 UTC (rev 4536)
@@ -72,7 +72,7 @@
 
   \item{dependencies}{An object of class \code{XiMpLe.node}
   to be pasted as the \code{<dependencies>} section, See
-  \code{\link[XiMpLe:rk.XML.dependencies]{rk.XML.dependencies}}
+  \code{\link[rkwarddev:rk.XML.dependencies]{rk.XML.dependencies}}
   for details. Skipped if \code{NULL}.}
 
   \item{namespace}{Character string, the namespace

Added: trunk/rkward/packages/rkwarddev/man/rk.XML.switch.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.switch.Rd	                        (rev 0)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.switch.Rd	2013-02-16 17:28:26 UTC (rev 4536)
@@ -0,0 +1,70 @@
+\name{rk.XML.switch}
+\alias{rk.XML.switch}
+\title{Create XML node "switch" for RKWard plugins}
+\usage{
+  rk.XML.switch(condition, modifier = NULL, true = NULL,
+    false = NULL, case = NULL, default = NULL,
+    id.name = "auto")
+}
+\arguments{
+  \item{condition}{Either a character string (the \code{id}
+  of the property whose state should be queried), or an
+  object of class \code{XiMpLe.node} (whose \code{id} will
+  be extracted and used).}
+
+  \item{modifier}{Character string, an optional modifier to
+  be appended tp \code{condition}.}
+
+  \item{true}{A named list, setting the return value if
+  \code{condition} is TRUE.  Must have either
+  \code{fixed_value} or \code{dynamic_value}.}
+
+  \item{false}{A named list, setting the return value if
+  \code{condition} is FALSE.  Must have either
+  \code{fixed_value} or \code{dynamic_value}.}
+
+  \item{case}{A list of named lists, setting the return
+  values if \code{condition == case}.  Each vector
+  represents one case; it must include a character string
+  called \code{standard}, which is the value to match
+  against, as well as either \code{fixed_value} or
+  \code{dynamic_value}.}
+
+  \item{default}{A named list, setting the default return
+  value if \code{condition} doesn't match any case. Must
+  have either \code{fixed_value} or \code{dynamic_value}.}
+
+  \item{id.name}{Character string, a unique ID for this
+  property.  If \code{"auto"}, IDs will be generated
+  automatically from the condition ID.}
+}
+\value{
+  An object of class \code{XiMpLe.node}.
+}
+\description{
+  This node can only be used in \code{<logic>} sections. If
+  the provided property is logical, you must also set
+  values for \code{true} and \code{false}. If not, you must
+  provide at least one \code{case}.
+}
+\details{
+  The values to be returned can be either
+  \code{fixed_value} or \code{dynamic_value}. A
+  \code{fixed_value} must be a character string which will
+  be returned if the condition is met. Whereas a
+  \code{dynamic_value} is the \code{id} of another
+  property, an can be provided as either a character string
+  or an object of class \code{XiMpLe.node}.
+}
+\examples{
+myCheckbox <- rk.XML.cbox("foo")
+rk.XML.switch(myCheckbox,
+  true=c(fixed_value="foo"),
+  false=list(fixed_value="bar")
+)
+}
+\seealso{
+  \href{help:rkwardplugins}{Introduction to Writing Plugins
+  for RKWard}
+}
+

Modified: trunk/rkward/packages/rkwarddev/man/rk.paste.JS.graph.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.paste.JS.graph.Rd	2013-02-15 17:02:25 UTC (rev 4535)
+++ trunk/rkward/packages/rkwarddev/man/rk.paste.JS.graph.Rd	2013-02-16 17:28:26 UTC (rev 4536)
@@ -20,6 +20,18 @@
   is of class \code{rk.plot.opts} (as returned by
   \code{rk.plotOptions}), will be fetched from
   \code{plotOpts} automatically.}
+
+  \item{level}{Integer, which indentation level to use,
+  minimum is 1.}
+
+  \item{indent.by}{A character string defining the
+  indentation string to use.}
+
+  \item{empty.e}{For \code{rk.JS.ite} objects only:
+  Logical, if \code{TRUE} will force to add empty
+  \code{else \{\}} brackets when there is no \code{else}
+  statement defined, which is considered to enhance code
+  readability by some.}
 }
 \value{
   A character string.

Modified: trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd	2013-02-15 17:02:25 UTC (rev 4535)
+++ trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd	2013-02-16 17:28:26 UTC (rev 4536)
@@ -9,7 +9,7 @@
 \details{
   \tabular{ll}{ Package: \tab rkwarddev\cr Type: \tab
   Package\cr Version: \tab 0.06-2\cr Date: \tab
-  2013-02-15\cr Depends: \tab R (>= 2.9.0),methods,XiMpLe
+  2013-02-16\cr Depends: \tab R (>= 2.9.0),methods,XiMpLe
   (>= 0.03-18),rkward (>= 0.5.6)\cr Enhances: \tab
   rkward\cr Encoding: \tab UTF-8\cr License: \tab GPL (>=
   3)\cr LazyLoad: \tab yes\cr URL: \tab





More information about the rkward-tracker mailing list