[rkward-cvs] SF.net SVN: rkward-code:[4927] trunk/rkward/packages/rkwarddev
m-eik at users.sf.net
m-eik at users.sf.net
Fri Oct 17 20:56:29 UTC 2014
Revision: 4927
http://sourceforge.net/p/rkward/code/4927
Author: m-eik
Date: 2014-10-17 20:56:28 +0000 (Fri, 17 Oct 2014)
Log Message:
-----------
rkwarddev: register optioncolumns in the internal environment, just like radio options
Modified Paths:
--------------
trunk/rkward/packages/rkwarddev/ChangeLog
trunk/rkward/packages/rkwarddev/DESCRIPTION
trunk/rkward/packages/rkwarddev/R/id.R
trunk/rkward/packages/rkwarddev/R/rk-internal.R
trunk/rkward/packages/rkwarddev/R/rk.XML.optionset.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/rkwarddev-package.Rd
Modified: trunk/rkward/packages/rkwarddev/ChangeLog
===================================================================
--- trunk/rkward/packages/rkwarddev/ChangeLog 2014-10-17 17:43:27 UTC (rev 4926)
+++ trunk/rkward/packages/rkwarddev/ChangeLog 2014-10-17 20:56:28 UTC (rev 4927)
@@ -17,7 +17,7 @@
text set with rk.set.rkh.prompter() and use it to generate help files
- all functions scanned by rk.rkh.scan() for setting nodes in .rkh files have gained two additional arguments,
"help" and "component", to register the text to be used via rk.set.rkh.prompter()
- - new function rk.XMLoption() to allow setting and accessing IDs for single options as well
+ - 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
Modified: trunk/rkward/packages/rkwarddev/DESCRIPTION
===================================================================
--- trunk/rkward/packages/rkwarddev/DESCRIPTION 2014-10-17 17:43:27 UTC (rev 4926)
+++ trunk/rkward/packages/rkwarddev/DESCRIPTION 2014-10-17 20:56:28 UTC (rev 4927)
@@ -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-16
+Date: 2014-10-17
Collate:
'echo.R'
'i18n.R'
Modified: trunk/rkward/packages/rkwarddev/R/id.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/id.R 2014-10-17 17:43:27 UTC (rev 4926)
+++ trunk/rkward/packages/rkwarddev/R/id.R 2014-10-17 20:56:28 UTC (rev 4927)
@@ -56,8 +56,10 @@
# optionsets are more difficult to identify automatically
if(isTRUE(js)){
node.id <- camelCode(get.IDs(check.optionset.tags(this.part), relevant.tags="optioncolumn")[,"abbrev"])
+# node.id <- check.ID(this.part, search.environment=TRUE, env.get="JS")
} else {
node.id <- get.IDs(check.optionset.tags(this.part), relevant.tags="optioncolumn")[,"id"]
+# node.id <- check.ID(this.part, search.environment=TRUE, env.get="XML")
}
} else {
node.id <- XMLAttrs(this.part)[["id"]]
Modified: trunk/rkward/packages/rkwarddev/R/rk-internal.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk-internal.R 2014-10-17 17:43:27 UTC (rev 4926)
+++ trunk/rkward/packages/rkwarddev/R/rk-internal.R 2014-10-17 20:56:28 UTC (rev 4927)
@@ -627,7 +627,8 @@
# - search.environment: if TRUE, the internal environment is searched for the ID
# as well; a use case for this is IDs of oprions, which need their parent IDs as well;
# see get.optionIDs() below
-check.ID <- function(node, search.environment=FALSE){
+# - env.get: the ID type to fetch from the environment, if search.environment=TRUE
+check.ID <- function(node, search.environment=FALSE, env.get="XML"){
if(is.list(node)){
return(sapply(node, check.ID))
} else {}
@@ -636,7 +637,7 @@
node.ID <- XMLAttrs(node)[["id"]]
if(isTRUE(search.environment)){
optionIDs <- get.optionIDs()[[node.ID]]
- node.ID <- ifelse(is.null(optionIDs), node.ID, optionIDs[["XML"]])
+ node.ID <- ifelse(is.null(optionIDs), node.ID, optionIDs[[env.get]])
} else {}
} else if(is.character(node)){
node.ID <- node
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.optionset.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.optionset.R 2014-10-17 17:43:27 UTC (rev 4926)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.optionset.R 2014-10-17 20:56:28 UTC (rev 4927)
@@ -125,5 +125,8 @@
attrs=attr.list,
.children=all.children)
+ # if present, store option IDs with parent ID
+ rk.register.options(optioncolumn, parent.node=node)
+
return(node)
}
Modified: trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R 2014-10-17 17:43:27 UTC (rev 4926)
+++ trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R 2014-10-17 20:56:28 UTC (rev 4927)
@@ -4,7 +4,7 @@
#' Package: \tab rkwarddev\cr
#' Type: \tab Package\cr
#' Version: \tab 0.06-5\cr
-#' Date: \tab 2014-10-16\cr
+#' Date: \tab 2014-10-17\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-17 17:43:27 UTC (rev 4926)
+++ trunk/rkward/packages/rkwarddev/inst/NEWS.Rd 2014-10-17 20:56:28 UTC (rev 4927)
@@ -22,7 +22,7 @@
text set with \code{rk.set.rkh.prompter()} and use it to generate help files
\item all functions scanned by \code{rk.rkh.scan()} for setting nodes in .rkh files have gained two additional arguments,
\code{"help"} and \code{"component"}, to register the text to be used via \code{rk.set.rkh.prompter()}
- \item new function \code{rk.XMLoption()} to allow setting and accessing IDs for single options as well
+ \item new function \code{rk.XML.option()} to allow setting and accessing IDs for single options as well
}
}
\subsection{changed}{
Modified: trunk/rkward/packages/rkwarddev/inst/doc/rkwarddev_vignette.pdf
===================================================================
(Binary files differ)
Modified: trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd 2014-10-17 17:43:27 UTC (rev 4926)
+++ trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd 2014-10-17 20:56:28 UTC (rev 4927)
@@ -11,7 +11,7 @@
Package: \tab rkwarddev\cr
Type: \tab Package\cr
Version: \tab 0.06-5\cr
-Date: \tab 2014-10-16\cr
+Date: \tab 2014-10-17\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