[rkward-cvs] SF.net SVN: rkward-code:[4538] trunk/rkward/packages/rkwarddev
m-eik at users.sf.net
m-eik at users.sf.net
Sun Feb 17 18:23:40 UTC 2013
Revision: 4538
http://sourceforge.net/p/rkward/code/4538
Author: m-eik
Date: 2013-02-17 18:23:39 +0000 (Sun, 17 Feb 2013)
Log Message:
-----------
rkwarddev: changed signature of rk.XML.switch() and updated docs
Modified Paths:
--------------
trunk/rkward/packages/rkwarddev/DESCRIPTION
trunk/rkward/packages/rkwarddev/NAMESPACE
trunk/rkward/packages/rkwarddev/R/rk.XML.connect.R
trunk/rkward/packages/rkwarddev/R/rk.XML.convert.R
trunk/rkward/packages/rkwarddev/R/rk.XML.dependencies.R
trunk/rkward/packages/rkwarddev/R/rk.XML.dependency_check.R
trunk/rkward/packages/rkwarddev/R/rk.XML.external.R
trunk/rkward/packages/rkwarddev/R/rk.XML.logic.R
trunk/rkward/packages/rkwarddev/R/rk.XML.matrix.R
trunk/rkward/packages/rkwarddev/R/rk.XML.optioncolumn.R
trunk/rkward/packages/rkwarddev/R/rk.XML.optiondisplay.R
trunk/rkward/packages/rkwarddev/R/rk.XML.optionset.R
trunk/rkward/packages/rkwarddev/R/rk.XML.set.R
trunk/rkward/packages/rkwarddev/R/rk.XML.switch.R
trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R
trunk/rkward/packages/rkwarddev/debian/control
trunk/rkward/packages/rkwarddev/inst/NEWS.Rd
trunk/rkward/packages/rkwarddev/inst/doc/rkwarddev_vignette.pdf
trunk/rkward/packages/rkwarddev/man/rk.XML.connect.Rd
trunk/rkward/packages/rkwarddev/man/rk.XML.convert.Rd
trunk/rkward/packages/rkwarddev/man/rk.XML.dependencies.Rd
trunk/rkward/packages/rkwarddev/man/rk.XML.dependency_check.Rd
trunk/rkward/packages/rkwarddev/man/rk.XML.external.Rd
trunk/rkward/packages/rkwarddev/man/rk.XML.logic.Rd
trunk/rkward/packages/rkwarddev/man/rk.XML.matrix.Rd
trunk/rkward/packages/rkwarddev/man/rk.XML.optioncolumn.Rd
trunk/rkward/packages/rkwarddev/man/rk.XML.optiondisplay.Rd
trunk/rkward/packages/rkwarddev/man/rk.XML.optionset.Rd
trunk/rkward/packages/rkwarddev/man/rk.XML.set.Rd
trunk/rkward/packages/rkwarddev/man/rk.XML.switch.Rd
trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd
Modified: trunk/rkward/packages/rkwarddev/DESCRIPTION
===================================================================
--- trunk/rkward/packages/rkwarddev/DESCRIPTION 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/DESCRIPTION 2013-02-17 18:23:39 UTC (rev 4538)
@@ -4,10 +4,10 @@
Author: m.eik michalke <meik.michalke at hhu.de>
Maintainer: m.eik michalke <meik.michalke at hhu.de>
Depends:
- R (>= 2.9.0),methods,XiMpLe (>= 0.03-18),rkward (>= 0.5.6)
+ R (>= 2.9.0),methods,XiMpLe (>= 0.03-17),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-16
+Date: 2013-02-17
Collate:
'echo.R'
'id.R'
Modified: trunk/rkward/packages/rkwarddev/NAMESPACE
===================================================================
--- trunk/rkward/packages/rkwarddev/NAMESPACE 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/NAMESPACE 2013-02-17 18:23:39 UTC (rev 4538)
@@ -1,40 +1,13 @@
-exportClasses(rk.JS.arr)
-exportClasses(rk.JS.ite)
-exportClasses(rk.JS.opt)
-exportClasses(rk.JS.var)
-exportClasses(rk.plot.opts)
-exportClasses(rk.plug.comp)
export(echo)
export(id)
export(ite)
-exportMethods(show)
export(qp)
-export(rk.build.plugin)
-export(rk.comment)
export(rk.JS.array)
export(rk.JS.doc)
export(rk.JS.options)
export(rk.JS.saveobj)
export(rk.JS.scan)
export(rk.JS.vars)
-export(rk.paste.JS)
-export(rk.paste.JS.graph)
-export(rk.plotOptions)
-export(rk.plugin.component)
-export(rk.plugin.skeleton)
-export(rk.rkh.caption)
-export(rk.rkh.doc)
-export(rk.rkh.link)
-export(rk.rkh.related)
-export(rk.rkh.scan)
-export(rk.rkh.section)
-export(rk.rkh.setting)
-export(rk.rkh.settings)
-export(rk.rkh.summary)
-export(rk.rkh.technical)
-export(rk.rkh.title)
-export(rk.rkh.usage)
-export(rk.testsuite.doc)
export(rk.XML.about)
export(rk.XML.attribute)
export(rk.XML.browser)
@@ -88,5 +61,32 @@
export(rk.XML.varselector)
export(rk.XML.varslot)
export(rk.XML.wizard)
+export(rk.build.plugin)
+export(rk.comment)
+export(rk.paste.JS)
+export(rk.paste.JS.graph)
+export(rk.plotOptions)
+export(rk.plugin.component)
+export(rk.plugin.skeleton)
+export(rk.rkh.caption)
+export(rk.rkh.doc)
+export(rk.rkh.link)
+export(rk.rkh.related)
+export(rk.rkh.scan)
+export(rk.rkh.section)
+export(rk.rkh.setting)
+export(rk.rkh.settings)
+export(rk.rkh.summary)
+export(rk.rkh.technical)
+export(rk.rkh.title)
+export(rk.rkh.usage)
+export(rk.testsuite.doc)
export(tf)
+exportClasses(rk.JS.arr)
+exportClasses(rk.JS.ite)
+exportClasses(rk.JS.opt)
+exportClasses(rk.JS.var)
+exportClasses(rk.plot.opts)
+exportClasses(rk.plug.comp)
+exportMethods(show)
import(methods)
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.connect.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.connect.R 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.connect.R 2013-02-17 18:23:39 UTC (rev 4538)
@@ -22,8 +22,9 @@
#' @seealso
#' \code{\link[rkwarddev:rk.XML.convert]{rk.XML.convert}},
#' \code{\link[rkwarddev:rk.XML.external]{rk.XML.external}},
-#' \code{\link[rkwarddev:rk.XML.logic]{rk.XML.logic}}
+#' \code{\link[rkwarddev:rk.XML.logic]{rk.XML.logic}},
#' \code{\link[rkwarddev:rk.XML.set]{rk.XML.set}},
+#' \code{\link[rkwarddev:rk.XML.switch]{rk.XML.switch}},
#' and the \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard}
#' @examples
#' test.connect <- rk.XML.connect(governor="lgc_foobar", client="frame_bar")
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.convert.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.convert.R 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.convert.R 2013-02-17 18:23:39 UTC (rev 4538)
@@ -35,6 +35,7 @@
#' \code{\link[rkwarddev:rk.XML.external]{rk.XML.external}},
#' \code{\link[rkwarddev:rk.XML.logic]{rk.XML.logic}},
#' \code{\link[rkwarddev:rk.XML.set]{rk.XML.set}},
+#' \code{\link[rkwarddev:rk.XML.switch]{rk.XML.switch}},
#' and the \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard}
#' @examples
#' test.convert <- rk.XML.convert(list(string="foo"), mode=c(notequals="bar"))
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.dependencies.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.dependencies.R 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.dependencies.R 2013-02-17 18:23:39 UTC (rev 4538)
@@ -1,5 +1,8 @@
#' Create XML node "dependencies" for RKWard pluginmaps
#'
+#' @note The \code{<dependencies>} node was introduced with RKWard 0.6.1, please set the dependencies
+#' of your component/plugin accordingly.
+#'
#' @param dependencies A named list with these elements:
#' \describe{
#' \item{rkward.min}{Minimum RKWard version needed for this plugin (optional)}
@@ -21,7 +24,9 @@
#' }
#' @param hints Logical, if \code{TRUE}, \code{NULL} values will be replaced with example text.
#' @export
-#' @seealso \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard}
+#' @seealso
+#' \code{\link[rkwarddev:rk.XML.dependency_check]{rk.XML.dependency_check}},
+#' and the \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard}
#' @examples
#' dependencies.node <- rk.XML.dependencies(
#' dependencies=list(
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.dependency_check.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.dependency_check.R 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.dependency_check.R 2013-02-17 18:23:39 UTC (rev 4538)
@@ -1,5 +1,8 @@
#' Create XML node "dependency_check" for RKWard pluginmaps
#'
+#' @note The \code{<dependency_check>} node was introduced with RKWard 0.6.1, please set the dependencies
+#' of your component/plugin accordingly.
+#'
#' @param id.name Character string, a unique ID for this plugin element.
#' @param dependencies A named list with these elements:
#' \describe{
@@ -22,7 +25,9 @@
#' }
#' @param hints Logical, if \code{TRUE}, \code{NULL} values will be replaced with example text.
#' @export
-#' @seealso \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard}
+#' @seealso
+#' \code{\link[rkwarddev:rk.XML.dependencies]{rk.XML.dependencies}},
+#' and the \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard}
#' @examples
#' dependency_check.node <- rk.XML.dependency_check(
#' id.name="dep_check",
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.external.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.external.R 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.external.R 2013-02-17 18:23:39 UTC (rev 4538)
@@ -5,10 +5,11 @@
#' @return An object of class \code{XiMpLe.node}.
#' @export
#' @seealso
-#' \code{\link[rkwarddev:rk.XML.convert]{rk.XML.convert}},
#' \code{\link[rkwarddev:rk.XML.connect]{rk.XML.connect}},
+#' \code{\link[rkwarddev:rk.XML.covert]{rk.XML.convert}},
#' \code{\link[rkwarddev:rk.XML.logic]{rk.XML.logic}},
#' \code{\link[rkwarddev:rk.XML.set]{rk.XML.set}},
+#' \code{\link[rkwarddev:rk.XML.switch]{rk.XML.switch}},
#' and the \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard}
#' @examples
#' test.external <- rk.XML.external(id="ext_property", default="none")
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.logic.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.logic.R 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.logic.R 2013-02-17 18:23:39 UTC (rev 4538)
@@ -13,6 +13,7 @@
#' \code{\link[rkwarddev:rk.XML.connect]{rk.XML.connect}},
#' \code{\link[rkwarddev:rk.XML.external]{rk.XML.external}},
#' \code{\link[rkwarddev:rk.XML.set]{rk.XML.set}},
+#' \code{\link[rkwarddev:rk.XML.switch]{rk.XML.switch}},
#' and the \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard}
#' @examples
#' # define an input field and two checkboxes
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.matrix.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.matrix.R 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.matrix.R 2013-02-17 18:23:39 UTC (rev 4538)
@@ -1,5 +1,8 @@
#' Create XML "matrix" node for RKWard plugins
#'
+#' @note The \code{<matrix>} node was introduced with RKWard 0.6.1, please set the dependencies
+#' of your component/plugin accordingly.
+#'
#' @param label Character string, a label for the matrix.
#' @param mode Character string, one of "integer", "real" or "string". The type of data that will
#' be accepted in the table (required)
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.optioncolumn.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.optioncolumn.R 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.optioncolumn.R 2013-02-17 18:23:39 UTC (rev 4538)
@@ -2,6 +2,9 @@
#'
#' These nodes are valid only inside \code{<optionset>} nodes.
#'
+#' @note The \code{<optionset>} node was introduced with RKWard 0.6.1, please set the dependencies
+#' of your component/plugin accordingly.
+#'
#' @param id.name Character string, a unique ID for this plugin element.
#' @param label Either logical or a character string. If given, the optioncolumn will be displayed in the \code{<optiondisplay>} in a column by that label.
#' If set to \code{TRUE} and you provide a XiMpLe node object to \code{connect}, the label will be extracted from that node.
@@ -14,6 +17,10 @@
#' @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
+#' @seealso
+#' \code{\link[rkwarddev:rk.XML.optionset]{rk.XML.optionset}},
+#' \code{\link[rkwarddev:rk.XML.optiondisplay]{rk.XML.optiondisplay}},
+#' and the \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard}
#' @examples
#' myInput <- rk.XML.input(label="Given name(s)", size="small")
#' myOptCol <- rk.XML.optioncolumn("os_name", connect=myInput, modifier="text")
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.optiondisplay.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.optiondisplay.R 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.optiondisplay.R 2013-02-17 18:23:39 UTC (rev 4538)
@@ -2,10 +2,17 @@
#'
#' This node is only allowed once insinde the \code{<content>} node of an \code{<optionset>}.
#'
+#' @note The \code{<optionset>} node was introduced with RKWard 0.6.1, please set the dependencies
+#' of your component/plugin accordingly.
+#'
#' @param index Logical, whether to show a column with a numeric index in the optiondisplay.
#' @param id.name Character string, a unique ID for this plugin element (optional).
#' @return An object of class \code{XiMpLe.node}.
#' @export
+#' @seealso
+#' \code{\link[rkwarddev:rk.XML.optionset]{rk.XML.optionset}},
+#' \code{\link[rkwarddev:rk.XML.optioncolumn]{rk.XML.optioncolumn}},
+#' and the \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard}
rk.XML.optiondisplay <- function(index=TRUE, id.name=NULL){
if(is.null(id.name)){
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.optionset.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.optionset.R 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.optionset.R 2013-02-17 18:23:39 UTC (rev 4538)
@@ -1,5 +1,8 @@
#' Create XML node "optionset" for RKWard plugins
#'
+#' @note The \code{<optionset>} node was introduced with RKWard 0.6.1, please set the dependencies
+#' of your component/plugin accordingly.
+#'
#' @param content A list of XiMpLe.nodes to be placed inside the <content> node of this <optionset>.
#' @param optioncolumn A list of \code{<optioncolumn>} XiMpLe.nodes.
#' @param min_rows Numeric (integer), if specified, the set will be marked invalid, unless it has
@@ -18,6 +21,10 @@
#' If \code{"auto"}, an ID will be generated automatically from the <content> nodes.
#' @return An object of class \code{XiMpLe.node}.
#' @export
+#' @seealso
+#' \code{\link[rkwarddev:rk.XML.optioncolumn]{rk.XML.optioncolumn}},
+#' \code{\link[rkwarddev:rk.XML.optiondisplay]{rk.XML.optiondisplay}},
+#' and the \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard}
rk.XML.optionset <- function(content, optioncolumn, min_rows=0, min_rows_if_any=0, max_rows=0, keycolumn=NULL, logic=NULL, optiondisplay=NULL, id.name="auto"){
if(identical(id.name, "auto")){
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.set.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.set.R 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.set.R 2013-02-17 18:23:39 UTC (rev 4538)
@@ -9,10 +9,11 @@
#' @return An object of class \code{XiMpLe.node}.
#' @export
#' @seealso
-#' \code{\link[rkwarddev:rk.XML.convert]{rk.XML.convert}},
#' \code{\link[rkwarddev:rk.XML.connect]{rk.XML.connect}},
#' \code{\link[rkwarddev:rk.XML.external]{rk.XML.external}},
#' \code{\link[rkwarddev:rk.XML.logic]{rk.XML.logic}},
+#' \code{\link[rkwarddev:rk.XML.set]{rk.XML.set}},
+#' \code{\link[rkwarddev:rk.XML.switch]{rk.XML.switch}},
#' and the \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard}
#' @examples
#' test.set <- rk.XML.set(id="input_foo", set="required", to=TRUE)
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.switch.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.switch.R 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.switch.R 2013-02-17 18:23:39 UTC (rev 4538)
@@ -1,44 +1,59 @@
#' 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}.
+#' is logical, in the \code{cases} list you must also provide lists called \code{true}
+#' and \code{false}. If not, you must provide at least one list called \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}.
#'
+#' @note The \code{<switch>} node was introduced with RKWard 0.6.1, please set the dependencies
+#' of your component/plugin accordingly.
+#'
#' @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 cases A named list of named lists. The lists contained must either be called
+#' \code{true} and \code{false}, setting the return values if \code{condition} is logical, or
+#' \code{case} and optionally \code{default}. You can provide as many \code{case} lists
+#' as you need, setting a return value for each \code{condition == case} respectively.
+#' Each list must contain either a \code{fixed_value} or a \code{dynamic_value} element.
+#' In addition, each \code{case} list must also have one \code{standard} element.
+#' @param modifier Character string, an optional modifier to be appended to \code{condition}.
#' @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}
+#' \code{\link[rkwarddev:rk.XML.connect]{rk.XML.connect}},
+#' \code{\link[rkwarddev:rk.XML.convert]{rk.XML.convert}},
+#' \code{\link[rkwarddev:rk.XML.external]{rk.XML.external}},
+#' \code{\link[rkwarddev:rk.XML.logic]{rk.XML.logic}},
+#' \code{\link[rkwarddev:rk.XML.set]{rk.XML.set}},
+#' and the \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard}
#' @examples
+#' # example for a boolean switch
#' myCheckbox <- rk.XML.cbox("foo")
-#' rk.XML.switch(myCheckbox,
-#' true=c(fixed_value="foo"),
-#' false=list(fixed_value="bar")
+#' rk.XML.switch(myCheckbox, cases=list(
+#' true=list(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"){
+#'
+#' # example for a case switch
+#' MyRadio <- rk.XML.radio("Chose one",
+#' options=list(
+#' "First Option"=c(val="val1"),
+#' "Second Option"=c(val="val2", chk=TRUE))
+#' )
+#' rk.XML.switch(MyRadio, modifier="string", cases=list(
+#' case=list(standard="val1", fixed_value="foo"),
+#' case=list(standard="val2", fixed_value="bar"))
+#' )
+rk.XML.switch <- function(condition, cases, modifier=NULL, id.name="auto"){
+
condition.id <- check.ID(condition)
if(is.XiMpLe.node(condition) && !is.null(modifier)){
# validate modifier
@@ -72,19 +87,21 @@
}
child.nodes <- list()
- if(!is.null(true) && !is.null(false)){
- true <- check.dyn.value(true)
- false <- check.dyn.value(false)
+ case.names <- names(cases)
+ # check for a sane set of cases
+ if(all(c("true","false") %in% case.names) && length(case.names) == 2){
+ true <- check.dyn.value(cases[["true"]])
+ false <- check.dyn.value(cases[["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){
+ } else if(all(!c("true","false") %in% case.names) && "case" %in% case.names){
+ for (thisNode in cases[case.names %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)
+ if(!is.null(cases[["default"]])){
+ default <- check.dyn.value(cases[["default"]])
child.nodes <- append(child.nodes, XMLNode("default", attrs=default))
} else {}
} else {
Modified: trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R 2013-02-17 18:23:39 UTC (rev 4538)
@@ -4,8 +4,8 @@
#' Package: \tab rkwarddev\cr
#' Type: \tab Package\cr
#' Version: \tab 0.06-2\cr
-#' Date: \tab 2013-02-16\cr
-#' Depends: \tab R (>= 2.9.0),methods,XiMpLe (>= 0.03-18),rkward (>= 0.5.6)\cr
+#' Date: \tab 2013-02-17\cr
+#' Depends: \tab R (>= 2.9.0),methods,XiMpLe (>= 0.03-17),rkward (>= 0.5.6)\cr
#' Enhances: \tab rkward\cr
#' Encoding: \tab UTF-8\cr
#' License: \tab GPL (>= 3)\cr
Modified: trunk/rkward/packages/rkwarddev/debian/control
===================================================================
--- trunk/rkward/packages/rkwarddev/debian/control 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/debian/control 2013-02-17 18:23:39 UTC (rev 4538)
@@ -2,15 +2,15 @@
Section: math
Priority: optional
Maintainer: m.eik michalke <meik.michalke at hhu.de>
-Build-Depends-Indep: debhelper (>> 4.1.0), r-base-dev (>= 2.9.0), cdbs, r-cran-ximple (>= 0.03-12) | r-other-reaktanz-ximple (>=
- 0.03-12) | r-other-rkward-ximple (>= 0.03-12), rkward (>= 0.5.6)
+Build-Depends-Indep: debhelper (>> 4.1.0), r-base-dev (>= 2.9.0), cdbs, r-cran-ximple (>= 0.03-18) | r-other-reaktanz-ximple (>=
+ 0.03-18) | r-other-rkward-ximple (>= 0.03-18), rkward (>= 0.5.6)
Standards-Version: 3.9.3.1
Homepage: http://rkward.sourceforge.net
Package: r-other-rkward-rkwarddev
Architecture: all
Section: math
-Depends: r-base (>= 2.15.0), r-cran-ximple (>= 0.03-12) | r-other-reaktanz-ximple (>= 0.03-12) | r-other-rkward-ximple (>= 0.03-12),
+Depends: r-base (>= 2.15.0), r-cran-ximple (>= 0.03-18) | r-other-reaktanz-ximple (>= 0.03-18) | r-other-rkward-ximple (>= 0.03-18),
rkward (>= 0.5.6)
Description: GNU R package: Provides functions to create plugin skeletons and XML structures for RKWard.
Homepage: http://rkward.sourceforge.net
Modified: trunk/rkward/packages/rkwarddev/inst/NEWS.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/inst/NEWS.Rd 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/inst/NEWS.Rd 2013-02-17 18:23:39 UTC (rev 4538)
@@ -1,16 +1,24 @@
\name{NEWS}
\title{News for Package 'rkwarddev'}
\encoding{UTF-8}
-\section{Changes in rkwarddev version 0.06-2 (2013-02-07)}{
+\section{Changes in rkwarddev version 0.06-2 (2013-02-15)}{
\subsection{changed}{
\itemize{
\item the structure of <about> nodes will change in RKWard 0.6.1, <dependencies> will become
- a direct child of <document> or <component>, which explains several changes in this release
+ a direct child of <document> or <component>, which explains several changes in this release.
+ this is not really critical, because this information wasn't evaluated by RKWard until now
+ anyway
\item for consistency, from now on <component> is never an empty node
+ \item \code{rk.XML.pluginmap()} will now move <dependencies> from <about> to a top level child node
+ of plugin maps, with a warning
}
}
\subsection{added}{
\itemize{
+ \item new function \code{rk.XML.switch()}
+ \item new function \code{rk.XML.optiondisplay()}
+ \item new function \code{rk.XML.optionset()}
+ \item new function \code{rk.XML.matrix()}
\item new function \code{rk.XML.dependencies()}
\item new function \code{rk.XML.dependency_check()}
\item added options \code{"dependencies"}, \code{"namespace"} and \code{"priority"} to \code{rk.XML.pluginmap()}
@@ -18,6 +26,11 @@
\item added \code{"map"} to \code{rk.XML.require()}
}
}
+ \subsection{fixed}{
+ \itemize{
+ \item added some missing parameter in the docs for \code{rk.paste.JS.graph()}
+ }
+ }
}
\section{Changes in rkwarddev version 0.06-1 (2012-11-08)}{
\subsection{changed}{
Modified: trunk/rkward/packages/rkwarddev/inst/doc/rkwarddev_vignette.pdf
===================================================================
(Binary files differ)
Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.connect.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.connect.Rd 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.connect.Rd 2013-02-17 18:23:39 UTC (rev 4538)
@@ -51,9 +51,10 @@
\seealso{
\code{\link[rkwarddev:rk.XML.convert]{rk.XML.convert}},
\code{\link[rkwarddev:rk.XML.external]{rk.XML.external}},
- \code{\link[rkwarddev:rk.XML.logic]{rk.XML.logic}}
- \code{\link[rkwarddev:rk.XML.set]{rk.XML.set}}, and the
- \href{help:rkwardplugins}{Introduction to Writing Plugins
- for RKWard}
+ \code{\link[rkwarddev:rk.XML.logic]{rk.XML.logic}},
+ \code{\link[rkwarddev:rk.XML.set]{rk.XML.set}},
+ \code{\link[rkwarddev:rk.XML.switch]{rk.XML.switch}}, and
+ the \href{help:rkwardplugins}{Introduction to Writing
+ Plugins for RKWard}
}
Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.convert.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.convert.Rd 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.convert.Rd 2013-02-17 18:23:39 UTC (rev 4538)
@@ -62,8 +62,9 @@
\code{\link[rkwarddev:rk.XML.connect]{rk.XML.connect}},
\code{\link[rkwarddev:rk.XML.external]{rk.XML.external}},
\code{\link[rkwarddev:rk.XML.logic]{rk.XML.logic}},
- \code{\link[rkwarddev:rk.XML.set]{rk.XML.set}}, and the
- \href{help:rkwardplugins}{Introduction to Writing Plugins
- for RKWard}
+ \code{\link[rkwarddev:rk.XML.set]{rk.XML.set}},
+ \code{\link[rkwarddev:rk.XML.switch]{rk.XML.switch}}, and
+ the \href{help:rkwardplugins}{Introduction to Writing
+ Plugins for RKWard}
}
Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.dependencies.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.dependencies.Rd 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.dependencies.Rd 2013-02-17 18:23:39 UTC (rev 4538)
@@ -33,6 +33,11 @@
\description{
Create XML node "dependencies" for RKWard pluginmaps
}
+\note{
+ The \code{<dependencies>} node was introduced with RKWard
+ 0.6.1, please set the dependencies of your
+ component/plugin accordingly.
+}
\examples{
dependencies.node <- rk.XML.dependencies(
dependencies=list(
@@ -49,7 +54,8 @@
)
}
\seealso{
- \href{help:rkwardplugins}{Introduction to Writing Plugins
- for RKWard}
+ \code{\link[rkwarddev:rk.XML.dependency_check]{rk.XML.dependency_check}},
+ 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-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.dependency_check.Rd 2013-02-17 18:23:39 UTC (rev 4538)
@@ -36,6 +36,11 @@
\description{
Create XML node "dependency_check" for RKWard pluginmaps
}
+\note{
+ The \code{<dependency_check>} node was introduced with
+ RKWard 0.6.1, please set the dependencies of your
+ component/plugin accordingly.
+}
\examples{
dependency_check.node <- rk.XML.dependency_check(
id.name="dep_check",
@@ -53,7 +58,8 @@
)
}
\seealso{
- \href{help:rkwardplugins}{Introduction to Writing Plugins
- for RKWard}
+ \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.external.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.external.Rd 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.external.Rd 2013-02-17 18:23:39 UTC (rev 4538)
@@ -21,11 +21,12 @@
cat(pasteXML(test.external))
}
\seealso{
- \code{\link[rkwarddev:rk.XML.convert]{rk.XML.convert}},
\code{\link[rkwarddev:rk.XML.connect]{rk.XML.connect}},
+ \code{\link[rkwarddev:rk.XML.covert]{rk.XML.convert}},
\code{\link[rkwarddev:rk.XML.logic]{rk.XML.logic}},
- \code{\link[rkwarddev:rk.XML.set]{rk.XML.set}}, and the
- \href{help:rkwardplugins}{Introduction to Writing Plugins
- for RKWard}
+ \code{\link[rkwarddev:rk.XML.set]{rk.XML.set}},
+ \code{\link[rkwarddev:rk.XML.switch]{rk.XML.switch}}, and
+ the \href{help:rkwardplugins}{Introduction to Writing
+ Plugins for RKWard}
}
Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.logic.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.logic.Rd 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.logic.Rd 2013-02-17 18:23:39 UTC (rev 4538)
@@ -40,8 +40,9 @@
\code{\link[rkwarddev:rk.XML.convert]{rk.XML.convert}},
\code{\link[rkwarddev:rk.XML.connect]{rk.XML.connect}},
\code{\link[rkwarddev:rk.XML.external]{rk.XML.external}},
- \code{\link[rkwarddev:rk.XML.set]{rk.XML.set}}, and the
- \href{help:rkwardplugins}{Introduction to Writing Plugins
- for RKWard}
+ \code{\link[rkwarddev:rk.XML.set]{rk.XML.set}},
+ \code{\link[rkwarddev:rk.XML.switch]{rk.XML.switch}}, and
+ the \href{help:rkwardplugins}{Introduction to Writing
+ Plugins for RKWard}
}
Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.matrix.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.matrix.Rd 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.matrix.Rd 2013-02-17 18:23:39 UTC (rev 4538)
@@ -71,6 +71,11 @@
\description{
Create XML "matrix" node for RKWard plugins
}
+\note{
+ The \code{<matrix>} node was introduced with RKWard
+ 0.6.1, please set the dependencies of your
+ component/plugin accordingly.
+}
\examples{
test.matrix <- rk.XML.matrix("A matrix")
}
Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.optioncolumn.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.optioncolumn.Rd 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.optioncolumn.Rd 2013-02-17 18:23:39 UTC (rev 4538)
@@ -45,8 +45,19 @@
These nodes are valid only inside \code{<optionset>}
nodes.
}
+\note{
+ The \code{<optionset>} node was introduced with RKWard
+ 0.6.1, please set the dependencies of your
+ component/plugin accordingly.
+}
\examples{
myInput <- rk.XML.input(label="Given name(s)", size="small")
myOptCol <- rk.XML.optioncolumn("os_name", connect=myInput, modifier="text")
}
+\seealso{
+ \code{\link[rkwarddev:rk.XML.optionset]{rk.XML.optionset}},
+ \code{\link[rkwarddev:rk.XML.optiondisplay]{rk.XML.optiondisplay}},
+ and the \href{help:rkwardplugins}{Introduction to Writing
+ Plugins for RKWard}
+}
Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.optiondisplay.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.optiondisplay.Rd 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.optiondisplay.Rd 2013-02-17 18:23:39 UTC (rev 4538)
@@ -18,4 +18,15 @@
This node is only allowed once insinde the
\code{<content>} node of an \code{<optionset>}.
}
+\note{
+ The \code{<optionset>} node was introduced with RKWard
+ 0.6.1, please set the dependencies of your
+ component/plugin accordingly.
+}
+\seealso{
+ \code{\link[rkwarddev:rk.XML.optionset]{rk.XML.optionset}},
+ \code{\link[rkwarddev:rk.XML.optioncolumn]{rk.XML.optioncolumn}},
+ and the \href{help:rkwardplugins}{Introduction to Writing
+ Plugins for RKWard}
+}
Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.optionset.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.optionset.Rd 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.optionset.Rd 2013-02-17 18:23:39 UTC (rev 4538)
@@ -47,4 +47,15 @@
\description{
Create XML node "optionset" for RKWard plugins
}
+\note{
+ The \code{<optionset>} node was introduced with RKWard
+ 0.6.1, please set the dependencies of your
+ component/plugin accordingly.
+}
+\seealso{
+ \code{\link[rkwarddev:rk.XML.optioncolumn]{rk.XML.optioncolumn}},
+ \code{\link[rkwarddev:rk.XML.optiondisplay]{rk.XML.optiondisplay}},
+ and the \href{help:rkwardplugins}{Introduction to Writing
+ Plugins for RKWard}
+}
Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.set.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.set.Rd 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.set.Rd 2013-02-17 18:23:39 UTC (rev 4538)
@@ -30,10 +30,11 @@
cat(pasteXML(test.set))
}
\seealso{
- \code{\link[rkwarddev:rk.XML.convert]{rk.XML.convert}},
\code{\link[rkwarddev:rk.XML.connect]{rk.XML.connect}},
\code{\link[rkwarddev:rk.XML.external]{rk.XML.external}},
- \code{\link[rkwarddev:rk.XML.logic]{rk.XML.logic}}, and
+ \code{\link[rkwarddev:rk.XML.logic]{rk.XML.logic}},
+ \code{\link[rkwarddev:rk.XML.set]{rk.XML.set}},
+ \code{\link[rkwarddev:rk.XML.switch]{rk.XML.switch}}, and
the \href{help:rkwardplugins}{Introduction to Writing
Plugins for RKWard}
}
Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.switch.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.switch.Rd 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.switch.Rd 2013-02-17 18:23:39 UTC (rev 4538)
@@ -2,8 +2,7 @@
\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,
+ rk.XML.switch(condition, cases, modifier = NULL,
id.name = "auto")
}
\arguments{
@@ -12,28 +11,21 @@
object of class \code{XiMpLe.node} (whose \code{id} will
be extracted and used).}
+ \item{cases}{A named list of named lists. The lists
+ contained must either be called \code{true} and
+ \code{false}, setting the return values if
+ \code{condition} is logical, or \code{case} and
+ optionally \code{default}. You can provide as many
+ \code{case} lists as you need, setting a return value for
+ each \code{condition == case} respectively. Each list
+ must contain either a \code{fixed_value} or a
+ \code{dynamic_value} element. In addition, each
+ \code{case} list must also have one \code{standard}
+ element.}
+
\item{modifier}{Character string, an optional modifier to
- be appended tp \code{condition}.}
+ be appended to \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.}
@@ -43,9 +35,10 @@
}
\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}.
+ the provided property is logical, in the \code{cases}
+ list you must also provide lists called \code{true} and
+ \code{false}. If not, you must provide at least one list
+ called \code{case}.
}
\details{
The values to be returned can be either
@@ -56,14 +49,36 @@
property, an can be provided as either a character string
or an object of class \code{XiMpLe.node}.
}
+\note{
+ The \code{<switch>} node was introduced with RKWard
+ 0.6.1, please set the dependencies of your
+ component/plugin accordingly.
+}
\examples{
+# example for a boolean switch
myCheckbox <- rk.XML.cbox("foo")
-rk.XML.switch(myCheckbox,
- true=c(fixed_value="foo"),
- false=list(fixed_value="bar")
+rk.XML.switch(myCheckbox, cases=list(
+ true=list(fixed_value="foo"),
+ false=list(fixed_value="bar"))
)
+
+# example for a case switch
+MyRadio <- rk.XML.radio("Chose one",
+ options=list(
+ "First Option"=c(val="val1"),
+ "Second Option"=c(val="val2", chk=TRUE))
+)
+rk.XML.switch(MyRadio, modifier="string", cases=list(
+ case=list(standard="val1", fixed_value="foo"),
+ case=list(standard="val2", fixed_value="bar"))
+)
}
\seealso{
+ \code{\link[rkwarddev:rk.XML.connect]{rk.XML.connect}},
+ \code{\link[rkwarddev:rk.XML.convert]{rk.XML.convert}},
+ \code{\link[rkwarddev:rk.XML.external]{rk.XML.external}},
+ \code{\link[rkwarddev:rk.XML.logic]{rk.XML.logic}},
+ \code{\link[rkwarddev:rk.XML.set]{rk.XML.set}}, and the
\href{help:rkwardplugins}{Introduction to Writing Plugins
for RKWard}
}
Modified: trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd 2013-02-17 08:42:10 UTC (rev 4537)
+++ trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd 2013-02-17 18:23:39 UTC (rev 4538)
@@ -9,8 +9,8 @@
\details{
\tabular{ll}{ Package: \tab rkwarddev\cr Type: \tab
Package\cr Version: \tab 0.06-2\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
+ 2013-02-17\cr Depends: \tab R (>= 2.9.0),methods,XiMpLe
+ (>= 0.03-17),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
http://rkward.sourceforge.net\cr }
More information about the rkward-tracker
mailing list