[rkward] packages/rkwarddev: added .objects argument to id() and qp()
m.eik michalke
meik.michalke at uni-duesseldorf.de
Sat Oct 24 12:43:24 UTC 2015
Git commit 977ab7c953fa9baf3b9ec055c3df136edf7238fb by m.eik michalke.
Committed on 19/10/2015 at 18:58.
Pushed by meikm into branch 'master'.
added .objects argument to id() and qp()
- preparing to parse operators in JS functions
M +2 -1 packages/rkwarddev/ChangeLog
M +1 -1 packages/rkwarddev/DESCRIPTION
M +3 -3 packages/rkwarddev/R/id.R
M +3 -2 packages/rkwarddev/R/qp.R
M +1 -1 packages/rkwarddev/R/rkwarddev-package.R
M +9 -1 packages/rkwarddev/inst/NEWS.Rd
M +4 -1 packages/rkwarddev/man/id.Rd
M +4 -1 packages/rkwarddev/man/qp.Rd
M +1 -1 packages/rkwarddev/man/rkwarddev-package.Rd
http://commits.kde.org/rkward/977ab7c953fa9baf3b9ec055c3df136edf7238fb
diff --git a/packages/rkwarddev/ChangeLog b/packages/rkwarddev/ChangeLog
index fb8a9f5..da877f3 100644
--- a/packages/rkwarddev/ChangeLog
+++ b/packages/rkwarddev/ChangeLog
@@ -1,6 +1,6 @@
ChangeLog for package rkwarddev
-changes in version 0.07-4 (2015-10-11)
+changes in version 0.07-4 (2015-10-19)
unreleased:
- this version is under development
fixed:
@@ -17,6 +17,7 @@ added:
working rkwarddev script calls
- new option "ignore" enables rk.uniqueIDs() to not check nodes for
duplicates (e.g., <copy>)
+ - new option ".objects" in id() and qp(), to provide objects as a list
changed:
- improved error handling in rk.JS.header(), error messages are more
informative now
diff --git a/packages/rkwarddev/DESCRIPTION b/packages/rkwarddev/DESCRIPTION
index aa6b9d9..e9cc1ce 100644
--- a/packages/rkwarddev/DESCRIPTION
+++ b/packages/rkwarddev/DESCRIPTION
@@ -16,7 +16,7 @@ LazyLoad: yes
URL: https://rkward.kde.org
Authors at R: c(person(given="m.eik", family="michalke", email="meik.michalke at hhu.de", role=c("aut", "cre")))
Version: 0.07-4
-Date: 2015-10-11
+Date: 2015-10-19
Collate:
'00_class_01_rk.JS.arr.R'
'00_class_02_rk.JS.var.R'
diff --git a/packages/rkwarddev/R/id.R b/packages/rkwarddev/R/id.R
index 1516545..2fb0dc9 100644
--- a/packages/rkwarddev/R/id.R
+++ b/packages/rkwarddev/R/id.R
@@ -31,6 +31,7 @@
#' @param collapse Character string, defining if and how the individual elements should be glued together.
#' @param js Logical, if \code{TRUE} returns JavaScript varaible names for \code{XiMpLe.node} objects.
#' Otherwise their actual ID is returned.
+#' @param .objects Alternative way of specifying objects, if you already have them as a list.
#' @return A character string.
#' @export
#' @seealso \code{\link[rkwarddev:rk.JS.vars]{rk.JS.vars}},
@@ -44,9 +45,8 @@
#' cbox1 <- rk.XML.cbox(label="foo", value="foo1", id.name="CheckboxFoo.ID")
#' id("The variable name is: ", cbox1, "!")
-id <- function(..., quote=FALSE, collapse="", js=TRUE){
- full.content <- list(...)
- ID.content <- sapply(full.content, function(this.part){
+id <- function(..., quote=FALSE, collapse="", js=TRUE, .objects=list(...)){
+ ID.content <- sapply(.objects, function(this.part){
# if this is a plot options object, by default only paste the printout slot
# and discard the rest
this.part <- stripCont(this.part, get="printout")
diff --git a/packages/rkwarddev/R/qp.R b/packages/rkwarddev/R/qp.R
index bedbcb2..74028ce 100644
--- a/packages/rkwarddev/R/qp.R
+++ b/packages/rkwarddev/R/qp.R
@@ -23,6 +23,7 @@
#'
#' @param ... One or several character strings and/or \code{XiMpLe.node} objects with plugin nodes,
#' and/or objects of classes \code{rk.JS.arr} or \code{rk.JS.opt}, simply separated by comma.
+#' @param .objects Alternative way of specifying objects, if you already have them as a list.
#' @return A character string.
#' @export
#' @seealso \code{\link[rkwarddev:rk.JS.vars]{rk.JS.vars}},
@@ -36,7 +37,7 @@
#' cbox1 <- rk.XML.cbox(label="foo", value="foo1", id.name="CheckboxFoo.ID")
#' qp("The variable name is: ", cbox1, "!")
-qp <- function(...){
- result <- id(..., quote=TRUE, collapse=" + ", js=TRUE)
+qp <- function(..., .objects=list(...)){
+ result <- id(quote=TRUE, collapse=" + ", js=TRUE, .objects=.objects)
return(result)
}
diff --git a/packages/rkwarddev/R/rkwarddev-package.R b/packages/rkwarddev/R/rkwarddev-package.R
index fe69088..8dca6cc 100644
--- a/packages/rkwarddev/R/rkwarddev-package.R
+++ b/packages/rkwarddev/R/rkwarddev-package.R
@@ -4,7 +4,7 @@
#' Package: \tab rkwarddev\cr
#' Type: \tab Package\cr
#' Version: \tab 0.07-4\cr
-#' Date: \tab 2015-10-11\cr
+#' Date: \tab 2015-10-19\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
diff --git a/packages/rkwarddev/inst/NEWS.Rd b/packages/rkwarddev/inst/NEWS.Rd
index 63d9ad1..a57bdb8 100644
--- a/packages/rkwarddev/inst/NEWS.Rd
+++ b/packages/rkwarddev/inst/NEWS.Rd
@@ -1,7 +1,7 @@
\name{NEWS}
\title{News for Package 'rkwarddev'}
\encoding{UTF-8}
-\section{Changes in rkwarddev version 0.07-4 (2015-10-11)}{
+\section{Changes in rkwarddev version 0.07-4 (2015-10-19)}{
\subsection{unreleased}{
\itemize{
\item this version is under development
@@ -25,6 +25,14 @@
working rkwarddev script calls
\item new option \code{"ignore"} enables \code{rk.uniqueIDs()} to not check nodes for
duplicates (e.g., <copy>)
+ \item new option \code{".objects"} in \code{id()} and \code{qp()}, to provide objects as a list
+ }
+ }
+ \subsection{changed}{
+ \itemize{
+ \item improved error handling in \code{rk.JS.header()}, error messages are more
+ informative now
+ \item \code{rk.uniqueIDs()} now checks \code{"dialog"} and \code{"wizard"} sections separately
}
}
}
diff --git a/packages/rkwarddev/man/id.Rd b/packages/rkwarddev/man/id.Rd
index 2b7a0f2..b7f3bbd 100644
--- a/packages/rkwarddev/man/id.Rd
+++ b/packages/rkwarddev/man/id.Rd
@@ -4,7 +4,7 @@
\alias{id}
\title{Replace XiMpLe.node objects with their ID value}
\usage{
-id(..., quote = FALSE, collapse = "", js = TRUE)
+id(..., quote = FALSE, collapse = "", js = TRUE, .objects = list(...))
}
\arguments{
\item{...}{One or several character strings and/or \code{XiMpLe.node} objects with plugin nodes,
@@ -21,6 +21,9 @@ written to files, e.g. by \code{cat}.}
\item{js}{Logical,
if \code{TRUE} returns JavaScript varaible names for \code{XiMpLe.node} objects.
Otherwise their actual ID is returned.}
+
+\item{.objects}{Alternative way of specifying objects,
+ if you already have them as a list.}
}
\value{
A character string.
diff --git a/packages/rkwarddev/man/qp.Rd b/packages/rkwarddev/man/qp.Rd
index afa2b22..f5cd35d 100644
--- a/packages/rkwarddev/man/qp.Rd
+++ b/packages/rkwarddev/man/qp.Rd
@@ -4,12 +4,15 @@
\alias{qp}
\title{Replace XiMpLe.node objects with their ID value}
\usage{
-qp(...)
+qp(..., .objects = list(...))
}
\arguments{
\item{...}{One or several character strings and/or \code{XiMpLe.node} objects with plugin nodes,
and/or objects of classes \code{rk.JS.arr} or \code{rk.JS.opt},
simply separated by comma.}
+
+\item{.objects}{Alternative way of specifying objects,
+ if you already have them as a list.}
}
\value{
A character string.
diff --git a/packages/rkwarddev/man/rkwarddev-package.Rd b/packages/rkwarddev/man/rkwarddev-package.Rd
index f6816a2..8f3fd36 100644
--- a/packages/rkwarddev/man/rkwarddev-package.Rd
+++ b/packages/rkwarddev/man/rkwarddev-package.Rd
@@ -12,7 +12,7 @@ A Collection of Tools for RKWard Plugin Development.
Package: \tab rkwarddev\cr
Type: \tab Package\cr
Version: \tab 0.07-4\cr
-Date: \tab 2015-10-11\cr
+Date: \tab 2015-10-19\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