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

m-eik at users.sf.net m-eik at users.sf.net
Sat Oct 18 15:01:50 UTC 2014


Revision: 4930
          http://sourceforge.net/p/rkward/code/4930
Author:   m-eik
Date:     2014-10-18 15:01:49 +0000 (Sat, 18 Oct 2014)
Log Message:
-----------
rkwarddev: added missing function rk.XML.select()

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.JS.scan.R
    trunk/rkward/packages/rkwarddev/R/rk.XML.dialog.R
    trunk/rkward/packages/rkwarddev/R/rk.XML.dropdown.R
    trunk/rkward/packages/rkwarddev/R/rk.XML.page.R
    trunk/rkward/packages/rkwarddev/R/rk.XML.radio.R
    trunk/rkward/packages/rkwarddev/R/rk.XML.wizard.R
    trunk/rkward/packages/rkwarddev/R/rk.rkh.scan.R
    trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R
    trunk/rkward/packages/rkwarddev/inst/NEWS.Rd
    trunk/rkward/packages/rkwarddev/inst/doc/rkwarddev_vignette.pdf
    trunk/rkward/packages/rkwarddev/man/rk.XML.dialog.Rd
    trunk/rkward/packages/rkwarddev/man/rk.XML.dropdown.Rd
    trunk/rkward/packages/rkwarddev/man/rk.XML.page.Rd
    trunk/rkward/packages/rkwarddev/man/rk.XML.radio.Rd
    trunk/rkward/packages/rkwarddev/man/rk.XML.wizard.Rd
    trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd

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

Modified: trunk/rkward/packages/rkwarddev/ChangeLog
===================================================================
--- trunk/rkward/packages/rkwarddev/ChangeLog	2014-10-18 13:39:21 UTC (rev 4929)
+++ trunk/rkward/packages/rkwarddev/ChangeLog	2014-10-18 15:01:49 UTC (rev 4930)
@@ -11,6 +11,7 @@
 added:
   - new functions rk.XML.valueselector(),  rk.XML.valueslot() and the combining rk.XML.values() to define
     <valueselector> and <valueslot> nodes, similar to rk.XML.varselector(),  rk.XML.varslot() and rk.XML.vars()
+  - new function rk.XML.select() to define <select> nodes
   - new functions rk.set.rkh.prompter() and rk.get.rkh.prompter() to make it easier to generate help files
     (later...)
   - rk.rkh.scan() (and automatically rk.plugin.skeleton() and rk.plugin.component()) are now capable of fetching
@@ -20,6 +21,8 @@
   - new function rk.XML.option() to allow setting and accessing IDs for single options as well
 changed:
   - updated the plugin skeleton example script; e.g., it now uses the new .rkh file generating features
+  - rk.XML.radio() and rk.XML.dropdown() now also accept objects made with rk.XML.option() in their respective
+    list of options
 
 changes in version 0.06-4 (2014-09-14)
 added:

Modified: trunk/rkward/packages/rkwarddev/DESCRIPTION
===================================================================
--- trunk/rkward/packages/rkwarddev/DESCRIPTION	2014-10-18 13:39:21 UTC (rev 4929)
+++ trunk/rkward/packages/rkwarddev/DESCRIPTION	2014-10-18 15:01:49 UTC (rev 4930)
@@ -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-5
-Date: 2014-10-17
+Date: 2014-10-18
 Collate:
     'echo.R'
     'i18n.R'
@@ -76,6 +76,7 @@
     'rk.XML.require.R'
     'rk.XML.row.R'
     'rk.XML.saveobj.R'
+    'rk.XML.select.R'
     'rk.XML.set.R'
     'rk.XML.snippet.R'
     'rk.XML.snippets.R'

Modified: trunk/rkward/packages/rkwarddev/NAMESPACE
===================================================================
--- trunk/rkward/packages/rkwarddev/NAMESPACE	2014-10-18 13:39:21 UTC (rev 4929)
+++ trunk/rkward/packages/rkwarddev/NAMESPACE	2014-10-18 15:01:49 UTC (rev 4930)
@@ -54,6 +54,7 @@
 export(rk.XML.require)
 export(rk.XML.row)
 export(rk.XML.saveobj)
+export(rk.XML.select)
 export(rk.XML.set)
 export(rk.XML.snippet)
 export(rk.XML.snippets)

Modified: trunk/rkward/packages/rkwarddev/R/rk-internal.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk-internal.R	2014-10-18 13:39:21 UTC (rev 4929)
+++ trunk/rkward/packages/rkwarddev/R/rk-internal.R	2014-10-18 15:01:49 UTC (rev 4930)
@@ -311,6 +311,7 @@
   "optioncolumn"="getList",
   "radio"="getString",
   "saveobject"="getString",
+  "select"="getString",
   "spinbox"="getString",
   "valueslot"="getString", 
   "varslot"="getString"
@@ -674,6 +675,7 @@
   preview=c("state", "state.not", "state.numeric"),
   radio=c("string", "number"),
   saveobject=c("selection", "parent", "objectname", "active"),
+  select=c("string", "number"),
   spinbox=c("int", "real"),
   text=c("text"),
   valueselector=c("available", "selected", "root"),
@@ -769,6 +771,7 @@
     "row", "saveobject", "spinbox", "stretch", "tabbook", "text", "valueselector",
     "valueslot", "varselector", "varslot", "!--"),
   radio=c("option"),
+  select=c("option"),
   settings=c("setting", "caption", "!--"),
   wizard=c("browser", "checkbox", "column", "copy",
     "dropdown", "embed", "formula", "frame", "include", "input", "insert", "matrix",

Modified: trunk/rkward/packages/rkwarddev/R/rk.JS.scan.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.JS.scan.R	2014-10-18 13:39:21 UTC (rev 4929)
+++ trunk/rkward/packages/rkwarddev/R/rk.JS.scan.R	2014-10-18 15:01:49 UTC (rev 4930)
@@ -34,8 +34,8 @@
 
 rk.JS.scan <- function(pXML, js=TRUE, add.abbrev=FALSE, guess.getter=FALSE, indent.by="\t"){
 
-  JS.relevant.tags <- c("radio", "varslot", "valueslot", "browser", "dropdown",
-    "checkbox", "saveobject", "input", "spinbox", "optioncolumn", "matrix")
+  JS.relevant.tags <- c("browser", "checkbox", "dropdown", "input", "matrix", "optioncolumn",
+    "radio", "saveobject", "select", "spinbox", "valueslot", "varslot")
   
   # getting the relevant IDs out of optionsets is a little tricky
   # this function will probe for sets and return single tags

Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.dialog.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.dialog.R	2014-10-18 13:39:21 UTC (rev 4929)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.dialog.R	2014-10-18 15:01:49 UTC (rev 4930)
@@ -20,8 +20,8 @@
 #'
 #' This function will create a dialog section with optional child nodes "browser", "checkbox",
 #' "column", "copy", "dropdown", "embed", "formula", "frame", "include", "input", "insert",
-#' "preview", "radio", "row", "saveobject", "spinbox", "stretch", "tabbook", "text", "valueselector",
-#' "valueslot", "varselector" and "varslot".
+#' "preview", "radio", "row", "saveobject", "select", "spinbox", "stretch", "tabbook", "text",
+#' "valueselector", "valueslot", "varselector" and "varslot".
 #'
 #' @param ... Objects of class \code{XiMpLe.node}.
 #' @param label Character string, a text label for this plugin element.

Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.dropdown.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.dropdown.R	2014-10-18 13:39:21 UTC (rev 4929)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.dropdown.R	2014-10-18 15:01:49 UTC (rev 4930)
@@ -21,7 +21,8 @@
 #' @param label Character string, a text label for this plugin element.
 #' @param options A named list with options to choose from. The names of the list elements will become
 #'    labels of the options, \code{val} defines the value to submit if the option is checked, and
-#'    \code{chk=TRUE} should be set in the one option which is checked by default.
+#'    \code{chk=TRUE} should be set in the one option which is checked by default. Objects generated with
+#'    \code{\link[rkwarddev:rk.XML.option]{rk.XML.option}} are accepted as well.
 #' @param id.name Character string, a unique ID for this plugin element.
 #'    If \code{"auto"} and a label was provided, an ID will be generated automatically from the label.
 #' @param help Character string, will be used as the \code{text} value for a setting node in the .rkh file.
@@ -40,19 +41,6 @@
 #' cat(pasteXML(test.dropdown))
 
 rk.XML.dropdown <- function(label, options=list(label=c(val="", chk=FALSE)), id.name="auto", help=NULL, component=rk.get.comp()){
-  num.opt <- length(options)
-  dd.options <- sapply(1:num.opt, function(this.num){
-      this.element <- names(options)[[this.num]]
-      this.value <- options[[this.num]][["val"]]
-      attr.list <- list(label=this.element, value=this.value)
-      if("chk" %in% names(options[[this.num]])){
-        if(isTRUE(as.logical(options[[this.num]][["chk"]]))){
-          attr.list[["checked"]] <- "true"
-        } else {}
-      } else {}
-      return(XMLNode("option", attrs=attr.list))
-    })
-
   if(identical(id.name, "auto")){
     id <- auto.ids(label, prefix=ID.prefix("dropdown"))
   } else {
@@ -60,6 +48,9 @@
   }
   drp.attr.list <- list(id=id, label=label)
 
+  # convert list elements into a list of XiMpLe nodes (if they aren't already)
+  dd.options <- rk.check.options(options, parent="dropdown")
+
   dropdown <- XMLNode("dropdown",
       attrs=drp.attr.list,
       .children=child.list(dd.options, empty=FALSE)

Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.page.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.page.R	2014-10-18 13:39:21 UTC (rev 4929)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.page.R	2014-10-18 15:01:49 UTC (rev 4930)
@@ -20,8 +20,7 @@
 #'
 #' This function will create a page node for wizard sections, with optional child nodes "browser", "checkbox",
 #' "column", "copy", "dropdown", "formula", "frame", "input", "page", "radio", "row", "saveobject",
-#' "spinbox", "stretch", "tabbook", "text", "valueselector", "valueslot", "varselector" and "varslot".
-#'
+#' "select", "spinbox", "stretch", "tabbook", "text", "valueselector", "valueslot", "varselector" and "varslot".
 #' @param ... Objects of class \code{XiMpLe.node}.
 #' @param id.name Character string, a unique ID for this plugin element.
 #'    If \code{"auto"}, an ID will be generated automatically from the objects in \code{...}.

Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.radio.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.radio.R	2014-10-18 13:39:21 UTC (rev 4929)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.radio.R	2014-10-18 15:01:49 UTC (rev 4930)
@@ -24,7 +24,8 @@
 #' @param label Character string, a text label for this plugin element.
 #' @param options A named list with options to choose from. The names of the list elements will become
 #'    labels of the options, \code{val} defines the value to submit if the option is checked, and
-#'    \code{chk=TRUE} should be set in the one option which is checked by default.
+#'    \code{chk=TRUE} should be set in the one option which is checked by default. Objects generated with
+#'    \code{\link[rkwarddev:rk.XML.option]{rk.XML.option}} are accepted as well.
 #' @param id.name Character string, a unique ID for this plugin element.
 #'    If \code{"auto"} and a label was provided, an ID will be generated automatically from the label.
 #' @param help Character string, will be used as the \code{text} value for a setting node in the .rkh file.

Added: trunk/rkward/packages/rkwarddev/R/rk.XML.select.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.select.R	                        (rev 0)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.select.R	2014-10-18 15:01:49 UTC (rev 4930)
@@ -0,0 +1,63 @@
+# Copyright 2010-2014 Meik Michalke <meik.michalke at hhu.de>
+#
+# This file is part of the R package rkwarddev.
+#
+# rkwarddev is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# rkwarddev is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with rkwarddev.  If not, see <http://www.gnu.org/licenses/>.
+
+
+#' Create XML node "select" for RKWard plugins
+#'
+#' @param label Character string, a text label for this plugin element.
+#' @param options A named list with options to choose from. The names of the list elements will become
+#'    labels of the options, \code{val} defines the value to submit if the option is selected, and
+#'    \code{chk=TRUE} should be set in the one option which is selected by default. Objects generated with
+#'    \code{\link[rkwarddev:rk.XML.option]{rk.XML.option}} are accepted as well.
+#' @param id.name Character string, a unique ID for this plugin element.
+#'    If \code{"auto"} and a label was provided, an ID will be generated automatically from the label.
+#' @param help Character string, will be used as the \code{text} value for a setting node in the .rkh file.
+#'    If set to \code{FALSE}, \code{\link[rkwarddev:rk.rkh.scan]{rk.rkh.scan}} will ignore this node.
+#'    Also needs \code{component} to be set accordingly!
+#' @param component Character string, name of the component this node belongs to. Only needed if you
+#'    want to use the scan features for automatic help file generation; needs \code{help} to be set
+#'    accordingly, too!
+#' @return An object of class \code{XiMpLe.node}.
+#' @seealso \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard}
+#' @export
+#' @examples
+#' test.select <- rk.XML.select("myselect",
+#'   options=list("First Option"=c(val="val1"),
+#'   "Second Option"=c(val="val2", chk=TRUE)))
+#' cat(pasteXML(test.select))
+
+rk.XML.select <- function(label, options=list(label=c(val="", chk=FALSE)), id.name="auto", help=NULL, component=rk.get.comp()){
+  if(identical(id.name, "auto")){
+    id <- auto.ids(label, prefix=ID.prefix("select"))
+  } else {
+    id <- id.name
+  }
+  slct.attr.list <- list(id=id, label=label)
+
+  # convert list elements into a list of XiMpLe nodes (if they aren't already)
+  sl.options <- rk.check.options(options, parent="select")
+
+  select <- XMLNode("select",
+      attrs=slct.attr.list,
+      .children=child.list(sl.options, empty=FALSE)
+    )
+
+  # check for .rkh content
+  rk.set.rkh.prompter(component=component, id=id, help=help)
+
+  return(select)
+}

Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.wizard.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.wizard.R	2014-10-18 13:39:21 UTC (rev 4929)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.wizard.R	2014-10-18 15:01:49 UTC (rev 4930)
@@ -20,7 +20,7 @@
 #'
 #' This function will create a wizard section with optional child nodes "browser", "checkbox",
 #' "column", "copy", "dropdown", "embed", "formula", "frame", "include", "input", "insert",
-#' "page", "preview", "radio", "row", "saveobject", "spinbox", "stretch", "tabbook", "text",
+#' "page", "preview", "radio", "row", "saveobject", "select", "spinbox", "stretch", "tabbook", "text",
 #' "valueselector", "valueslot", "varselector" and "varslot".
 #'
 #' @param ... Objects of class \code{XiMpLe.node}

Modified: trunk/rkward/packages/rkwarddev/R/rk.rkh.scan.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.rkh.scan.R	2014-10-18 13:39:21 UTC (rev 4929)
+++ trunk/rkward/packages/rkwarddev/R/rk.rkh.scan.R	2014-10-18 15:01:49 UTC (rev 4930)
@@ -30,8 +30,9 @@
 
 rk.rkh.scan <- function(pXML, help=TRUE, captions=TRUE, component=NULL){
 
-  settings.tags <- c("radio", "varslot", "valueslot", "browser", "dropdown",
-    "checkbox", "saveobject", "input", "spinbox", "optioncolumn", "matrix")
+  settings.tags <- c("browser", "checkbox", "dropdown", "input", "matrix", "optioncolumn",
+    "radio", "saveobject", "select", "spinbox", "valueslot", "varslot")
+    
   if(isTRUE(captions)){
     caption.tags <- c("page", "tab", "frame")
   } else {

Modified: trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R	2014-10-18 13:39:21 UTC (rev 4929)
+++ trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R	2014-10-18 15:01:49 UTC (rev 4930)
@@ -4,7 +4,7 @@
 #' Package: \tab rkwarddev\cr
 #' Type: \tab Package\cr
 #' Version: \tab 0.06-5\cr
-#' Date: \tab 2014-10-17\cr
+#' Date: \tab 2014-10-18\cr
 #' Depends: \tab R (>= 2.9.0),methods,XiMpLe (>= 0.03-21),rkward (>= 0.5.7)\cr
 #' Enhances: \tab rkward\cr
 #' Encoding: \tab UTF-8\cr

Modified: trunk/rkward/packages/rkwarddev/inst/NEWS.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/inst/NEWS.Rd	2014-10-18 13:39:21 UTC (rev 4929)
+++ trunk/rkward/packages/rkwarddev/inst/NEWS.Rd	2014-10-18 15:01:49 UTC (rev 4930)
@@ -16,6 +16,7 @@
     \itemize{
       \item new functions \code{rk.XML.valueselector()},  \code{rk.XML.valueslot()} and the combining \code{rk.XML.values()} to define
         <valueselector> and <valueslot> nodes, similar to \code{rk.XML.varselector()},  \code{rk.XML.varslot()} and \code{rk.XML.vars()}
+      \item new function \code{rk.XML.select()} to define <select> nodes
       \item new functions \code{rk.set.rkh.prompter()} and \code{rk.get.rkh.prompter()} to make it easier to generate help files
         (later...)
       \item \code{rk.rkh.scan()} (and automatically \code{rk.plugin.skeleton()} and \code{rk.plugin.component()}) are now capable of fetching
@@ -28,6 +29,8 @@
   \subsection{changed}{
     \itemize{
       \item updated the plugin skeleton example script; e.g., it now uses the new .rkh file generating features
+      \item \code{rk.XML.radio()} and \code{rk.XML.dropdown()} now also accept objects made with \code{rk.XML.option()} in their respective
+        list of options
     }
   }
 }

Modified: trunk/rkward/packages/rkwarddev/inst/doc/rkwarddev_vignette.pdf
===================================================================
(Binary files differ)

Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.dialog.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.dialog.Rd	2014-10-18 13:39:21 UTC (rev 4929)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.dialog.Rd	2014-10-18 15:01:49 UTC (rev 4930)
@@ -23,9 +23,9 @@
 This function will create a dialog section with optional child nodes "browser",
       "checkbox",
 "column", "copy", "dropdown", "embed", "formula", "frame", "include", "input", "insert",
-"preview", "radio", "row", "saveobject", "spinbox", "stretch", "tabbook", "text",
-      "valueselector",
-"valueslot", "varselector" and "varslot".
+"preview", "radio", "row", "saveobject", "select", "spinbox", "stretch", "tabbook",
+      "text",
+"valueselector", "valueslot", "varselector" and "varslot".
 }
 \examples{
 # define an input field and two checkboxes

Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.dropdown.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.dropdown.Rd	2014-10-18 13:39:21 UTC (rev 4929)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.dropdown.Rd	2014-10-18 15:01:49 UTC (rev 4930)
@@ -12,7 +12,8 @@
 \item{options}{A named list with options to choose from. The names of the list elements will become
 labels of the options, \code{val} defines the value to submit if the option is checked,
       and
-\code{chk=TRUE} should be set in the one option which is checked by default.}
+\code{chk=TRUE} should be set in the one option which is checked by default. Objects generated with
+\code{\link[rkwarddev:rk.XML.option]{rk.XML.option}} are accepted as well.}
 
 \item{id.name}{Character string, a unique ID for this plugin element.
 If \code{"auto"} and a label was provided,

Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.page.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.page.Rd	2014-10-18 13:39:21 UTC (rev 4929)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.page.Rd	2014-10-18 15:01:49 UTC (rev 4930)
@@ -20,7 +20,7 @@
       with optional child nodes "browser", "checkbox",
 "column", "copy", "dropdown", "formula", "frame", "input", "page", "radio", "row",
       "saveobject",
-"spinbox", "stretch", "tabbook", "text", "valueselector", "valueslot",
+"select", "spinbox", "stretch", "tabbook", "text", "valueselector", "valueslot",
       "varselector" and "varslot".
 }
 \examples{

Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.radio.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.radio.Rd	2014-10-18 13:39:21 UTC (rev 4929)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.radio.Rd	2014-10-18 15:01:49 UTC (rev 4930)
@@ -12,7 +12,8 @@
 \item{options}{A named list with options to choose from. The names of the list elements will become
 labels of the options, \code{val} defines the value to submit if the option is checked,
       and
-\code{chk=TRUE} should be set in the one option which is checked by default.}
+\code{chk=TRUE} should be set in the one option which is checked by default. Objects generated with
+\code{\link[rkwarddev:rk.XML.option]{rk.XML.option}} are accepted as well.}
 
 \item{id.name}{Character string, a unique ID for this plugin element.
 If \code{"auto"} and a label was provided,

Added: trunk/rkward/packages/rkwarddev/man/rk.XML.select.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.select.Rd	                        (rev 0)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.select.Rd	2014-10-18 15:01:49 UTC (rev 4930)
@@ -0,0 +1,48 @@
+% Generated by roxygen2 (4.0.2): do not edit by hand
+\name{rk.XML.select}
+\alias{rk.XML.select}
+\title{Create XML node "select" for RKWard plugins}
+\usage{
+rk.XML.select(label, options = list(label = c(val = "", chk = FALSE)),
+  id.name = "auto", help = NULL, component = rk.get.comp())
+}
+\arguments{
+\item{label}{Character string, a text label for this plugin element.}
+
+\item{options}{A named list with options to choose from. The names of the list elements will become
+labels of the options, \code{val} defines the value to submit if the option is selected,
+      and
+\code{chk=TRUE} should be set in the one option which is selected by default. Objects generated with
+\code{\link[rkwarddev:rk.XML.option]{rk.XML.option}} are accepted as well.}
+
+\item{id.name}{Character string, a unique ID for this plugin element.
+If \code{"auto"} and a label was provided,
+      an ID will be generated automatically from the label.}
+
+\item{help}{Character string,
+      will be used as the \code{text} value for a setting node in the .rkh file.
+If set to \code{FALSE},
+      \code{\link[rkwarddev:rk.rkh.scan]{rk.rkh.scan}} will ignore this node.
+Also needs \code{component} to be set accordingly!}
+
+\item{component}{Character string,
+      name of the component this node belongs to. Only needed if you
+want to use the scan features for automatic help file generation; needs \code{help} to be set
+accordingly, too!}
+}
+\value{
+An object of class \code{XiMpLe.node}.
+}
+\description{
+Create XML node "select" for RKWard plugins
+}
+\examples{
+test.select <- rk.XML.select("myselect",
+  options=list("First Option"=c(val="val1"),
+  "Second Option"=c(val="val2", chk=TRUE)))
+cat(pasteXML(test.select))
+}
+\seealso{
+\href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard}
+}
+

Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.wizard.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.wizard.Rd	2014-10-18 13:39:21 UTC (rev 4929)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.wizard.Rd	2014-10-18 15:01:49 UTC (rev 4930)
@@ -21,7 +21,8 @@
 This function will create a wizard section with optional child nodes "browser",
       "checkbox",
 "column", "copy", "dropdown", "embed", "formula", "frame", "include", "input", "insert",
-"page", "preview", "radio", "row", "saveobject", "spinbox", "stretch", "tabbook", "text",
+"page", "preview", "radio", "row", "saveobject", "select", "spinbox", "stretch",
+      "tabbook", "text",
 "valueselector", "valueslot", "varselector" and "varslot".
 }
 \examples{

Modified: trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd	2014-10-18 13:39:21 UTC (rev 4929)
+++ trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd	2014-10-18 15:01:49 UTC (rev 4930)
@@ -11,7 +11,7 @@
 Package: \tab rkwarddev\cr
 Type: \tab Package\cr
 Version: \tab 0.06-5\cr
-Date: \tab 2014-10-17\cr
+Date: \tab 2014-10-18\cr
 Depends: \tab R (>= 2.9.0),methods,XiMpLe (>= 0.03-21),rkward (>= 0.5.7)\cr
 Enhances: \tab rkward\cr
 Encoding: \tab UTF-8\cr





More information about the rkward-tracker mailing list