[rkward-cvs] SF.net SVN: rkward:[3906] trunk/rkward/packages/rkwarddev
m-eik at users.sourceforge.net
m-eik at users.sourceforge.net
Fri Oct 7 21:55:46 UTC 2011
Revision: 3906
http://rkward.svn.sourceforge.net/rkward/?rev=3906&view=rev
Author: m-eik
Date: 2011-10-07 21:55:46 +0000 (Fri, 07 Oct 2011)
Log Message:
-----------
rkwarddev: id() now correctly fetches the JavaScript varnames, not the XML IDs.
Modified Paths:
--------------
trunk/rkward/packages/rkwarddev/R/id.R
trunk/rkward/packages/rkwarddev/man/id.Rd
Modified: trunk/rkward/packages/rkwarddev/R/id.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/id.R 2011-10-07 21:33:17 UTC (rev 3905)
+++ trunk/rkward/packages/rkwarddev/R/id.R 2011-10-07 21:55:46 UTC (rev 3906)
@@ -3,7 +3,7 @@
#' This function is intended to be used for generating JavaScript code for
#' RKWard plugins. Its sole purpose is to replace objects of class \code{XiMpLe.node}
#' which hold an XML node of some plugin GUI definition, and objects of classes \code{rk.JS.arr} or \code{rk.JS.opt}
-#' with their ID, and combine these replacements with character strings.
+#' with their ID (or JS variable name), and combine these replacements with character strings.
#'
#' @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.
@@ -20,13 +20,13 @@
#' @examples
#' # an example checkbox XML node
#' cbox1 <- rk.XML.cbox(label="foo", value="foo1", id.name="CheckboxFoo.ID")
-#' id("The ID is: ", cbox1, "!", quote=TRUE, collapse=" + ")
+#' id("The variable name is: ", cbox1, "!", quote=TRUE, collapse=" + ")
id <- function(..., quote=FALSE, collapse=""){
full.content <- list(...)
ID.content <- sapply(full.content, function(this.part){
if(inherits(this.part, "XiMpLe.node")){
- node.id <- this.part at attributes$id
+ node.id <- camelCode(this.part at attributes$id)
return(node.id)
} else if(inherits(this.part, "rk.JS.arr") | inherits(this.part, "rk.JS.opt")){
node.id <- this.part at opt.name
Modified: trunk/rkward/packages/rkwarddev/man/id.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/id.Rd 2011-10-07 21:33:17 UTC (rev 3905)
+++ trunk/rkward/packages/rkwarddev/man/id.Rd 2011-10-07 21:55:46 UTC (rev 3906)
@@ -26,13 +26,13 @@
to replace objects of class \code{XiMpLe.node} which hold
an XML node of some plugin GUI definition, and objects of
classes \code{rk.JS.arr} or \code{rk.JS.opt} with their
- ID, and combine these replacements with character
- strings.
+ ID (or JS variable name), and combine these replacements
+ with character strings.
}
\examples{
# an example checkbox XML node
cbox1 <- rk.XML.cbox(label="foo", value="foo1", id.name="CheckboxFoo.ID")
-id("The ID is: ", cbox1, "!", quote=TRUE, collapse=" + ")
+id("The variable name is: ", cbox1, "!", quote=TRUE, collapse=" + ")
}
\seealso{
\code{\link[rkwarddev:rk.JS.vars]{rk.JS.vars}},
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list