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

m-eik at users.sf.net m-eik at users.sf.net
Thu Feb 21 00:10:42 UTC 2013


Revision: 4546
          http://sourceforge.net/p/rkward/code/4546
Author:   m-eik
Date:     2013-02-21 00:10:41 +0000 (Thu, 21 Feb 2013)
Log Message:
-----------
rkwarddev: a full load of fixes and updates, most significantly
 - rk.plugin.component() and rk.plugin.skeleton() can now guess 0.6.1-style JavaScript-getters;
 - rk.XML.plugin() and rk.plugin.skeleton() learned about the changes to <dependencies> location;
 - the demo script was updated to reflect the latest changes, and used to update the included skeleton plugin

Modified Paths:
--------------
    trunk/rkward/packages/rkwarddev/ChangeLog
    trunk/rkward/packages/rkwarddev/DESCRIPTION
    trunk/rkward/packages/rkwarddev/R/rk-internal.R
    trunk/rkward/packages/rkwarddev/R/rk.JS.scan.R
    trunk/rkward/packages/rkwarddev/R/rk.XML.frame.R
    trunk/rkward/packages/rkwarddev/R/rk.XML.plugin.R
    trunk/rkward/packages/rkwarddev/R/rk.XML.pluginmap.R
    trunk/rkward/packages/rkwarddev/R/rk.plugin.component.R
    trunk/rkward/packages/rkwarddev/R/rk.plugin.skeleton.R
    trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R
    trunk/rkward/packages/rkwarddev/demo/skeleton_dialog.R
    trunk/rkward/packages/rkwarddev/inst/NEWS.Rd
    trunk/rkward/packages/rkwarddev/inst/doc/rkwarddev_vignette.pdf
    trunk/rkward/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap
    trunk/rkward/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.js
    trunk/rkward/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.xml
    trunk/rkward/packages/rkwarddev/man/rk.JS.scan.Rd
    trunk/rkward/packages/rkwarddev/man/rk.XML.frame.Rd
    trunk/rkward/packages/rkwarddev/man/rk.XML.plugin.Rd
    trunk/rkward/packages/rkwarddev/man/rk.plugin.component.Rd
    trunk/rkward/packages/rkwarddev/man/rk.plugin.skeleton.Rd
    trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd

Modified: trunk/rkward/packages/rkwarddev/ChangeLog
===================================================================
--- trunk/rkward/packages/rkwarddev/ChangeLog	2013-02-20 19:15:30 UTC (rev 4545)
+++ trunk/rkward/packages/rkwarddev/ChangeLog	2013-02-21 00:10:41 UTC (rev 4546)
@@ -7,14 +7,16 @@
     this is not really critical, because this information wasn't evaluated by RKWard until now
     anyway
   - for consistency, from now on <component> is never an empty node
-  - rk.XML.pluginmap() will now move <dependencies> from <about> to a top level child node
-    of plugin maps, with a warning
+  - rk.XML.pluginmap(), rk.XML.plugin() and rk.plugin.skeleton() will now move <dependencies>
+    from <about> to a top level child node of plugin maps, with a warning
   - the object class rk.JS.var gained a new slot "getter" to set a default JS function
     to query variable values. it defaults to "getValue" to ensure compatibility with earlier
-    releases. consequently, rk.JS.vars() and rk.paste.JS() have a new "getter" argument to set
+    releases. consequently, rk.JS.vars() and rk.paste.JS() have a new  "getter" argument to set
     or overwrite this value. another new argument, "guess.getter", can be used to turn on
-    automatic guessing which getter function might be most appropriate.
+    automatic guessing which getter function might be most appropriate. this was also added to
+    rk.plugin.component() and rk.plugin.skeleton().
   - rk.JS.scan() learned how to treat <optionset> and <matrix>
+  - updated the skeleton_dialog.R demo file and recreated the plugin code
 added:
   - new function rk.XML.switch()
   - new function rk.XML.optiondisplay()

Modified: trunk/rkward/packages/rkwarddev/DESCRIPTION
===================================================================
--- trunk/rkward/packages/rkwarddev/DESCRIPTION	2013-02-20 19:15:30 UTC (rev 4545)
+++ trunk/rkward/packages/rkwarddev/DESCRIPTION	2013-02-21 00:10:41 UTC (rev 4546)
@@ -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-20
+Date: 2013-02-21
 Collate:
     'echo.R'
     'id.R'

Modified: trunk/rkward/packages/rkwarddev/R/rk-internal.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk-internal.R	2013-02-20 19:15:30 UTC (rev 4545)
+++ trunk/rkward/packages/rkwarddev/R/rk-internal.R	2013-02-21 00:10:41 UTC (rev 4546)
@@ -185,7 +185,7 @@
 	return(ids)
 } ## end function get.IDs()
 
-## function check.optionset.tags
+## function check.optionset.tags()
 # XML.obj may be a character string (file name) or XiMpLe object
 # this functions will check if <optionset> nodes are present
 # and return a possibly corrected result of get.single.tags()
@@ -217,7 +217,7 @@
 		result <- c(optioncolumnNewIDs, get.single.tags(XML.obj=XML.obj, drop=drop))
 	}
 	return(result)
-} ## end function check.optionset.tags
+} ## end function check.optionset.tags()
 
 ## function camelCode()
 # changes the first letter of each string
@@ -246,16 +246,17 @@
 # will only be used if "guess.getter" is true -- and after it's properly implemented
 # into rk.JS.scan()
 JS.getters.default <- list(
-	"radio"="getString",
-	"varslot"="getString",
 	"browser"="getString",
+	"checkbox"="getBoolean",
 	"dropdown"="getString",
-	"checkbox"="getBool",
+	"frame"="getBoolean",
+	"input"="getString",
+	"matrix"="getList",
+	"optioncolumn"="getList",
+	"radio"="getString",
 	"saveobject"="getString",
-	"input"="getString",
 	"spinbox"="getString",
-	"optioncolumn"="getList",
-	"matrix"="getList"
+	"varslot"="getString"
 )
 
 ## function get.JS.vars()
@@ -314,7 +315,7 @@
 
 	if(isTRUE(names.only)){
 		results <- c()
-		if(is.null(modifiers) | isTRUE(default)){
+		if(is.null(modifiers) || isTRUE(default)){
 			results <- camelCode(c(JS.prefix, JS.var))
 		} else {}
 		if(!is.null(modifiers)){
@@ -413,25 +414,24 @@
 
 
 ## function XML2dependencies()
-# extracts the package dependencies info from XML "about" nodes
+# extracts the package dependencies info from XML "about"/"dependencies" nodes
 # in "suggest" mode only suggestions will be returned, in "depends" mode only dependencies.
 # suggest=TRUE: Depends: R & RKWard; Suggests: packages
 # suggest=FALSE: Depends: R & RKWard & packages; suggests: none
 XML2dependencies <- function(node, suggest=TRUE, mode="suggest"){
-	if(!isTRUE(suggest) & identical(mode, "suggest")){
+	if(!isTRUE(suggest) && identical(mode, "suggest")){
 		return("")
 	} else {}
 	if(is.XiMpLe.node(node)){
 		# check if this is *really* a about section, otherwise die of boredom
-		if(!identical(XMLName(node), "about")){
-			stop(simpleError("I don't know what this is, but 'about' is not an about section!"))
+		if(!XMLName(node) %in% c("about", "dependencies")){
+			stop(simpleError("Please provide a valid about or dependencies section!"))
 		} else {}
 	} else {
-		stop(simpleError("'about' must be a XiMpLe.node, see ?rk.XML.about()!"))
+		stop(simpleError("'about' and/or 'dependencies' must be XiMpLe.nodes, see ?rk.XML.about() and ?rk.XML.dependencies()!"))
 	}
-	check.deps <- sapply(XMLChildren(node), function(this.child){identical(XMLName(this.child), "dependencies")})
-	if(any(check.deps)){
-		got.deps <- XMLChildren(node)[[which(check.deps)]]
+	got.deps <- XMLScan(node, "dependencies")
+	if(!is.null(got.deps)){
 		deps.packages <- list()
 		# first see if RKWard and R versions are given
 		deps.RkR <- XMLAttrs(got.deps)
@@ -445,11 +445,11 @@
 		Rk.min <- ifelse("rkward_min_version" %in% deps.RkR.options, paste(">= ", deps.RkR[["rkward_min_version"]], sep=""), "")
 		Rk.max <- ifelse("rkward_max_version" %in% deps.RkR.options, paste("< ", deps.RkR[["rkward_max_version"]], sep=""), "")
 		Rk.version.indices <- sum(!identical(Rk.min, ""), !identical(Rk.max, ""))
-		if(Rk.version.indices > 0 & identical(mode, "depends")){
+		if(Rk.version.indices > 0 && identical(mode, "depends")){
 			deps.packages[[length(deps.packages) + 1]] <- paste("rkward (", Rk.min, ifelse(Rk.version.indices > 1, ", ", ""), Rk.max, ")", sep="")
 		} else {}
 		check.deps.pckg <- sapply(XMLChildren(got.deps), function(this.child){identical(XMLName(this.child), "package")})
-		if(any(check.deps.pckg & ((isTRUE(suggest) & identical(mode, "suggest")) | !isTRUE(suggest)))){
+		if(any(check.deps.pckg) && ((isTRUE(suggest) && identical(mode, "suggest")) | !isTRUE(suggest))){
 			deps.packages[[length(deps.packages) + 1]] <- paste(sapply(which(check.deps.pckg), function(this.pckg){
 					this.pckg.dep <- XMLAttrs(XMLChildren(got.deps)[[this.pckg]])
 					pckg.options <- names(this.pckg.dep)
@@ -985,3 +985,45 @@
 	
 	return(results)
 } ## end function paste.JS.var()
+
+
+## function dependenciesCompatWrapper()
+# with RKWard 0.6.1, the dependencies will no longer be a part of <about>
+# this wrapper takes both, "about" and "dependencies" arguments,
+# splits dependencies off and returns both in a list
+dependenciesCompatWrapper <- function(dependencies, about, hints=FALSE){
+	if(!is.null(about)){
+		# check if this is *really* a about section
+		valid.parent("about", node=about, see="rk.XML.about")
+		# check for <dependencies> in <about>; is NULL if not found
+		# this will only be used if dependencies is NULL
+		deps.in.about <- XMLScan(about, "dependencies")
+		if(!is.null(deps.in.about)){
+			warning("<dependencies> inside <about> is deprecated, use the 'dependencies' argument instead!")
+			# remove the misplaced node
+			XMLScan(about, "dependencies") <- NULL
+		}
+	} else {
+		if(isTRUE(hints)){
+			about <- XMLNode("!--", XMLNode("about", ""))
+		} else {}
+		deps.in.about <- NULL
+	}
+
+	# initialize results list
+	results <- list(about=about)
+
+	if(!is.null(dependencies)){
+		# check if this is *really* a dependencies section
+		valid.parent("dependencies", node=dependencies, see="rk.XML.dependencies")
+		results[["dependencies"]] <- dependencies
+	} else if(is.XiMpLe.node(deps.in.about)){
+		results[["dependencies"]] <- deps.in.about
+	} else if(isTRUE(hints)){
+		dependencies.XML <- XMLNode("!--", XMLNode("dependencies", ""))
+		results[["dependencies"]] <- dependencies.XML
+	} else {
+		results[["dependencies"]] <- NULL
+	}
+	return(results)
+} ## end function dependenciesCompatWrapper()

Modified: trunk/rkward/packages/rkwarddev/R/rk.JS.scan.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.JS.scan.R	2013-02-20 19:15:30 UTC (rev 4545)
+++ trunk/rkward/packages/rkwarddev/R/rk.JS.scan.R	2013-02-21 00:10:41 UTC (rev 4546)
@@ -7,7 +7,8 @@
 #'		three letter abbreviation of the XML tag type to improve the readability of the code. But it's
 #'		probably better to add this in the XML code in the first place.
 #' @param guess.getter Logical, if \code{TRUE} try to get a good default getter function for JavaScript
-#'		variable values.
+#'		variable values. This will use some functions which were added with RKWard 0.6.1, and therefore
+#'		raise the dependencies for your plugin/component accordingly. Nonetheless, it's recommended.
 #' @param indent.by Character string used to indent each entry if \code{js=TRUE}.
 #' @return A character vector.
 #' @seealso \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard}

Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.frame.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.frame.R	2013-02-20 19:15:30 UTC (rev 4545)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.frame.R	2013-02-21 00:10:41 UTC (rev 4546)
@@ -1,4 +1,4 @@
-#' Create XML node "column" for RKWard plugins
+#' Create XML node "frame" for RKWard plugins
 #'
 #' @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.plugin.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.plugin.R	2013-02-20 19:15:30 UTC (rev 4545)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.plugin.R	2013-02-21 00:10:41 UTC (rev 4546)
@@ -18,9 +18,11 @@
 #' @param label Character string, a text label for the plugin's top level, i.e. the window title of the dialog.
 #'		Will only be used if \code{dialog} or \code{wizard} are \code{NULL}.
 #' @param clean.name Logical, if \code{TRUE}, all non-alphanumeric characters except the underscore (\code{"_"}) will be removed from \code{name}.
-#' @param about An object of class \code{XiMpLe.node} with descriptive information on the plugin, its authors and dependencies,
+#' @param about An object of class \code{XiMpLe.node} with descriptive information on the plugin and its authors,
 #'		see \code{link[XiMpLe:rk.XML.about]{rk.XML.about}} for details. Only useful for information that differs from the \code{<about>}
 #'		section of the \code{.pluginmap} file. Skipped if \code{NULL}.
+#' @param dependencies An object of class \code{XiMpLe.node} to be pasted as the \code{<dependencies>} section,
+#'		See \code{\link[rkwarddev:rk.XML.dependencies]{rk.XML.dependencies}} for details. Skipped if \code{NULL}.
 #' @param gen.info Logical, if \code{TRUE} a comment note will be written into the document,
 #'		that it was generated by \code{rkwarddev} and changes should be done to the script.
 #' @return An object of class \code{XiMpLe.doc}.
@@ -42,7 +44,8 @@
 #' test.plugin <- rk.XML.plugin("My test", dialog=rk.XML.dialog(test.tabbook))
 #' }
 
-rk.XML.plugin <- function(name, dialog=NULL, wizard=NULL, logic=NULL, snippets=NULL, provides=NULL, help=TRUE, pluginmap=NULL, label=NULL, clean.name=TRUE, about=NULL, gen.info=TRUE){
+rk.XML.plugin <- function(name, dialog=NULL, wizard=NULL, logic=NULL, snippets=NULL, provides=NULL, help=TRUE, pluginmap=NULL,
+	label=NULL, clean.name=TRUE, about=NULL, dependencies=NULL, gen.info=TRUE){
 	if(isTRUE(clean.name)){
 		name.orig <- name
 		name <- clean.name(name)
@@ -64,9 +67,19 @@
 		all.children[[length(all.children)+1]] <- rk.XML.include(file=pluginmap)
 	} else {}
 
+	# check about and dependencies
+	# result is a named list with "about" and "dependencies"
+	about.dep.list <- dependenciesCompatWrapper(dependencies=dependencies, about=about, hints=FALSE)
+	dependencies <- about.dep.list[["dependencies"]]
+	about <- about.dep.list[["about"]]
+
+	# dependencies section
+	if(!is.null(dependencies)){
+		all.children[[length(all.children)+1]] <- dependencies
+	} else {}
+
+	# about section
 	if(!is.null(about)){
-		# check if this is *really* an about section, otherwise quit and go dancing
-		valid.parent("about", node=about, see="rk.XML.about")
 		all.children[[length(all.children)+1]] <- about
 	} else {}
 

Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.pluginmap.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.pluginmap.R	2013-02-20 19:15:30 UTC (rev 4545)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.pluginmap.R	2013-02-21 00:10:41 UTC (rev 4546)
@@ -64,43 +64,21 @@
 		all.children[[length(all.children)+1]] <- generator.info
 	} else {}
 
+	# check about and dependencies
+	# result is a named list with "about" and "dependencies"
+	about.dep.list <- dependenciesCompatWrapper(dependencies=dependencies, about=about, hints=hints)
+	dependencies <- about.dep.list[["dependencies"]]
+	about <- about.dep.list[["about"]]
+
 	## dependencies section
 	if(!is.null(dependencies)){
-		# check if this is *really* a dependencies section
-		valid.parent("dependencies", node=dependencies, see="rk.XML.dependencies")
-		# initialize all.children list
 		all.children[[length(all.children)+1]] <- dependencies
-	} else {
-		## wrapper for compatibility with earlier releases
-		# check for <dependencies> in <about>, and if found,
-		# take it out and use it here
-		deps.in.about <- try(
-			node(about, node=list("about","dependencies")),
-			silent=TRUE)
-		if(is.XiMpLe.node(deps.in.about)){
-			warning("<dependencies> inside <about> is deprecated, use the 'dependencies' argument instead!")
-			all.children[[length(all.children)+1]] <- deps.in.about
-			# remove <dependencies> from <about>
-			node(about, node=list("about","dependencies")) <- NULL
-		} else if(isTRUE(hints)){
-			dependencies.XML <- XMLNode("!--", XMLNode("dependencies", ""))
-			# initialize all.children list
-			all.children[[length(all.children)+1]] <- dependencies.XML
-		} else {}
-	}
+	} else {}
 
 	## about section
 	if(!is.null(about)){
-		# check if this is *really* a about section
-		valid.parent("about", node=about, see="rk.XML.about")
-		# initialize all.children list
 		all.children[[length(all.children)+1]] <- about
-	} else {
-		if(isTRUE(hints)){
-			about.XML <- XMLNode("!--", XMLNode("about", ""))
-			all.children[[length(all.children)+1]] <- about.XML
-		} else {}
-	}
+	} else {}
 
 	## require section
 	if(!is.null(require)){

Modified: trunk/rkward/packages/rkwarddev/R/rk.plugin.component.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.plugin.component.R	2013-02-20 19:15:30 UTC (rev 4545)
+++ trunk/rkward/packages/rkwarddev/R/rk.plugin.component.R	2013-02-21 00:10:41 UTC (rev 4546)
@@ -29,6 +29,9 @@
 #'				the \code{<settings>} section of the help file. This option will be overruled if you provide that section manually
 #'				by the \code{rkh} option (see below).}
 #'		}
+#' @param guess.getter Logical, if \code{TRUE} try to get a good default getter function for JavaScript
+#'		variable values (if \code{scan} is active). This will use some functions which were added with RKWard 0.6.1, and therefore
+#'		raise the dependencies for your plugin/component accordingly. Nonetheless, it's recommended.
 #' @param hierarchy A character vector with instructions where to place this component in the menu hierarchy, one list or string.
 #'		Valid single values are \code{"file"}, \code{"edit"}, \code{"view"}, \code{"workspace"}, \code{"run"}, \code{"data"},
 #'		\code{"analysis"}, \code{"plots"}, \code{"distributions"}, \code{"windows"}, \code{"settings"} and \code{"help"},
@@ -65,8 +68,8 @@
 #' }
 
 rk.plugin.component <- function(about, xml=list(), js=list(), rkh=list(),
-	provides=c("logic", "dialog"), scan=c("var", "saveobj", "settings"), hierarchy="test",
-	pluginmap=NULL, create=c("xml", "js", "rkh"), gen.info=TRUE, indent.by="\t"){
+	provides=c("logic", "dialog"), scan=c("var", "saveobj", "settings"), guess.getter=FALSE,
+	hierarchy="test", pluginmap=NULL, create=c("xml", "js", "rkh"), gen.info=TRUE, indent.by="\t"){
 
 	if(inherits(about, "XiMpLe.node")){
 		about.node.name <- slot(about, "name")
@@ -141,7 +144,7 @@
 			js[["results.header"]] <- paste("\"", name.orig, " results\"", sep="")
 		} else {}
 		if("var" %in% scan){
-			var.scanned <- rk.JS.scan(XML.plugin)
+			var.scanned <- rk.JS.scan(XML.plugin, guess.getter=guess.getter)
 			if(!is.null(var.scanned)){
 				js[["variables"]] <- paste(
 					ifelse(is.null(js[["variables"]]), "", paste(js[["variables"]], "\n", sep="")),

Modified: trunk/rkward/packages/rkwarddev/R/rk.plugin.skeleton.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.plugin.skeleton.R	2013-02-20 19:15:30 UTC (rev 4545)
+++ trunk/rkward/packages/rkwarddev/R/rk.plugin.skeleton.R	2013-02-21 00:10:41 UTC (rev 4546)
@@ -4,7 +4,7 @@
 #' components/dialogs. You should always define one main component (by \code{xml}, \code{js}, \code{rkh} etc.) before you provide
 #' additional features by \code{components}.
 #'
-#' @param about Either an object of class \code{XiMpLe.node} with descriptive information on the plugin, its authors and dependencies
+#' @param about Either an object of class \code{XiMpLe.node} with descriptive information on the plugin and its authors
 #'		(see \code{link[XiMpLe:rk.XML.about]{rk.XML.about}} for details), or a character string with the name of the plugin package.
 #'		If the latter, no \code{DESCRIPTION} file will be created.
 #' @param path Character sting, path to the main directory where the skeleton should be created.
@@ -21,6 +21,9 @@
 #'				the \code{<settings>} section of the help file. This option will be overruled if you provide that section manually
 #'				by the \code{rkh} option (see below).}
 #'		}
+#' @param guess.getter Logical, if \code{TRUE} try to get a good default getter function for JavaScript
+#'		variable values (if \code{scan} is active). This will use some functions which were added with RKWard 0.6.1, and therefore
+#'		raise the dependencies for your plugin/component accordingly. Nonetheless, it's recommended.
 #' @param xml A named list of options to be forwarded to \code{\link[rkwarddev:rk.XML.plugin]{rk.XML.plugin}}, to generate the GUI XML file.
 #'		Not all options are supported because some don't make sense in this context. Valid options are:
 #'		\code{"dialog"}, \code{"wizard"}, \code{"logic"} and \code{"snippets"}.
@@ -57,6 +60,8 @@
 #' @param suggest.required Logical, if \code{TRUE} R package dependencies in \code{about} will be added to the \code{Suggests:}
 #'		field of the \code{DESCRIPTION} file, otherwise to the \code{Depends:} field.
 #' @param components A list of plugin components. See \code{\link[rkwarddev:rk.XML.component]{rk.XML.component}} for details.
+#' @param dependencies An object of class \code{XiMpLe.node} to be pasted as the \code{<dependencies>} section,
+#'		See \code{\link[rkwarddev:rk.XML.dependencies]{rk.XML.dependencies}} for details. Skipped if \code{NULL}.
 #' @param edit Logical, if \code{TRUE} RKWard will automatically open the created files for editing, by calling \code{rk.edit.files}.
 #'		This applies to all files defined in \code{create}.
 #' @param load Logical, if \code{TRUE} and \code{"pmap"} in \code{create}, RKWard will automatically add the created .pluginmap file
@@ -65,6 +70,7 @@
 #'		it was loaded (i.e., this implies and also sets \code{load=TRUE}). This will only work on the main component, though.
 #' @param gen.info Logical, if \code{TRUE} comment notes will be written into the genrated documents,
 #'		that they were generated by \code{rkwarddev} and changes should be done to the script.
+#' @param hints Logical, if \code{TRUE} and you leave out optional entries (like \code{dependencies=NULL}), dummy sections will be added as comments.
 #' @param indent.by A character string defining the indentation string to use.
 #' @return Character string with the path to the plugin root directory.
 #' @seealso \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard}
@@ -130,25 +136,26 @@
 
 rk.plugin.skeleton <- function(about, path=tempdir(),
 	provides=c("logic", "dialog"),
-	scan=c("var", "saveobj", "settings"),
+	scan=c("var", "saveobj", "settings"), guess.getter=FALSE,
 	xml=list(), js=list(), pluginmap=list(), rkh=list(),
 	overwrite=FALSE, tests=TRUE, lazyLoad=TRUE,
 	create=c("pmap", "xml", "js", "rkh", "desc", "clog"), suggest.required=TRUE,
-	components=list(), edit=FALSE, load=FALSE, show=FALSE, gen.info=TRUE, indent.by="\t"){
+	components=list(), dependencies=NULL, edit=FALSE, load=FALSE, show=FALSE, gen.info=TRUE,
+	hints=TRUE, indent.by="\t"){
 
 	if(inherits(about, "XiMpLe.node")){
-		about.node.name <- slot(about, "name")
-		# check if this is *really* a about section, otherwise quit and go dancing
-		if(!identical(about.node.name, "about")){
-			stop(simpleError("I don't know what this is, but 'about' is not an about section!"))
-		} else {
-			# fetch the plugin name
-			name <- slot(about, "attributes")[["name"]]
-			about.node <- about
-		}
+		# check about and dependencies
+		# result is a named list with "about" and "dependencies"
+		about.dep.list <- dependenciesCompatWrapper(dependencies=dependencies, about=about, hints=hints)
+		dependencies.node <- about.dep.list[["dependencies"]]
+		about.node <- about.dep.list[["about"]]
+		# fetch the plugin name
+		name <- XMLAttrs(about.node)[["name"]]
 	} else if(is.character(about) & length(about) == 1) {
 		name <- about
 		about.node <- NULL
+		dependencies.node <- dependenciesCompatWrapper(dependencies=dependencies,
+			about=NULL, hints=hints)[["dependencies"]]
 		# also stop creation of DESCRIPTION and ChangeLog files
 		create <- create[!create %in% c("desc", "clog")]
 	} else {
@@ -214,6 +221,7 @@
 		rkh=rkh,
 		provides=provides,
 		scan=scan,
+		guess.getter=guess.getter,
 		hierarchy=pluginmap[["hierarchy"]],
 		pluginmap=paste("../", name, ".pluginmap", sep=""),
 		create=create[create %in% c("xml", "js", "rkh")],
@@ -301,8 +309,9 @@
 				components=all.components,
 				hierarchy=all.hierarchies,
 				require=pluginmap[["require"]],
-				hints=TRUE,
-				gen.info=gen.info)
+				hints=hints,
+				gen.info=gen.info,
+				dependencies=dependencies.node)
 			cat(pasteXML(XML.pluginmap, shine=2, indent.by=indent.by), file=plugin.pluginmap)
 			# needed for "show"
 			pm.id.name <- pluginmap[["name"]]
@@ -349,8 +358,8 @@
 				Author=all.authors,
 				AuthorsR=XML2person(about.node, eval=FALSE),
 				Maintainer=all.maintainers,
-				Depends=XML2dependencies(about.node, suggest=suggest.required, mode="depends"),
-				Suggests=XML2dependencies(about.node, suggest=suggest.required, mode="suggest"),
+				Depends=XML2dependencies(dependencies.node, suggest=suggest.required, mode="depends"),
+				Suggests=XML2dependencies(dependencies.node, suggest=suggest.required, mode="suggest"),
 				Enhances="rkward",
 				Description=slot(about.node, "attributes")[["longinfo"]],
 				License=slot(about.node, "attributes")[["license"]],

Modified: trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R	2013-02-20 19:15:30 UTC (rev 4545)
+++ trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R	2013-02-21 00:10:41 UTC (rev 4546)
@@ -4,7 +4,7 @@
 #' Package: \tab rkwarddev\cr
 #' Type: \tab Package\cr
 #' Version: \tab 0.06-2\cr
-#' Date: \tab 2013-02-20\cr
+#' Date: \tab 2013-02-21\cr
 #' Depends: \tab R (>= 2.9.0),methods,XiMpLe (>= 0.03-18),rkward (>= 0.5.6)\cr
 #' Enhances: \tab rkward\cr
 #' Encoding: \tab UTF-8\cr

Modified: trunk/rkward/packages/rkwarddev/demo/skeleton_dialog.R
===================================================================
--- trunk/rkward/packages/rkwarddev/demo/skeleton_dialog.R	2013-02-20 19:15:30 UTC (rev 4545)
+++ trunk/rkward/packages/rkwarddev/demo/skeleton_dialog.R	2013-02-21 00:10:41 UTC (rev 4546)
@@ -2,15 +2,20 @@
 require(rkwarddev)
 
 local({
+# define where the plugin should write its files
+output.dir <- tempdir()
+
 about.info <- rk.XML.about(
 	name="RKWard Plugin Skeleton",
 	author=c(
 		person(given="Meik", family="Michalke",
 			email="meik.michalke at hhu.de", role=c("aut","cre"))),
 	about=list(desc="GUI interface to create RKWard plugin skeletons",
-		version="0.04-2", url="http://rkward.sf.net"),
-	dependencies=list(rkward.min="0.5.7")
+		# the version number should be in line with rkwarddev
+		# to reflect when the script code was changed
+		version="0.06-2", url="http://rkward.sf.net")
 	)
+dependencies.info <- rk.XML.dependencies(dependencies=list(rkward.min="0.6.0"))
 
 # tab1: information on the thing
 about.plugin <- rk.XML.frame(
@@ -32,8 +37,8 @@
 			aut.email <- rk.XML.input("E-mail", required=TRUE),
 			rk.XML.stretch()),
 		rk.XML.col(rk.XML.frame(
-			aut.auth <- rk.XML.cbox("Author", "aut", chk=TRUE),
-			aut.maint <- rk.XML.cbox("Maintainer", "cre", chk=TRUE),
+			aut.auth <- rk.XML.cbox("Author", chk=TRUE),
+			aut.maint <- rk.XML.cbox("Maintainer", chk=TRUE),
 			rk.XML.stretch(), label="Author roles"))),
 	label="Plugin author")
 
@@ -44,14 +49,14 @@
 		rk.XML.row(pl.dir <- rk.XML.browser("Directory to save to (empty for $TEMPDIR)", type="dir", required=FALSE)),
 		rk.XML.row(
 			rk.XML.col(
-				pl.overw <- rk.XML.cbox("Overwrite existing files", "true", chk=FALSE),
-				pl.wiz <- rk.XML.cbox("Add wizard section", "true", chk=FALSE),
-				pl.tests <- rk.XML.cbox("Include plugin tests", "true", chk=TRUE),
+				pl.overw <- rk.XML.cbox("Overwrite existing files", chk=FALSE),
+				pl.wiz <- rk.XML.cbox("Add wizard section", chk=FALSE),
+				pl.tests <- rk.XML.cbox("Include plugin tests", chk=TRUE),
 				rk.XML.stretch()),
 			rk.XML.col(
-				pl.edit <- rk.XML.cbox("Open files for editing", "true", chk=TRUE),
-				pl.add <- rk.XML.cbox("Add plugin to RKWard configuration", "true", chk=TRUE),
-				pl.show <- rk.XML.cbox("Show the plugin", "true", chk=FALSE),
+				pl.edit <- rk.XML.cbox("Open files for editing", chk=TRUE),
+				pl.add <- rk.XML.cbox("Add plugin to RKWard configuration", chk=TRUE),
+				pl.show <- rk.XML.cbox("Show the plugin", chk=FALSE),
 				rk.XML.stretch())
 		),
 		rk.XML.row(pl.hier <- rk.XML.dropdown("Place in top menu",
@@ -73,7 +78,6 @@
 		))
 	)
 dep.opts <- rk.XML.frame(
-	rk.XML.row(dep.checkbox <- rk.XML.cbox("Define dependencies", "true", chk=FALSE)),
 	rk.XML.row(
 		dep.frame.RKWard <- rk.XML.frame(
 				dep.rkmin <- rk.XML.input("RKWard min", size="small"),
@@ -86,7 +90,7 @@
 # 	rk.XML.row(dep.frame.packages <- rk.XML.frame(rk.XML.stretch(before=list(
 # 			rk.XML.text("Separate package names by space:"),
 # 			dep.pckg <- rk.XML.input("Packages"))), label="Depends on R packages"))
-	), label="Dependencies")
+	), label="Define dependencies", checkable=TRUE, chk=FALSE)
 
 tab2.create <- rk.XML.col(crt.opts, dep.opts)
 
@@ -114,16 +118,16 @@
 
 ## some logic
 logic.section <- rk.XML.logic(
-		rk.XML.connect(governor=dep.checkbox, client=dep.frame.RKWard, set="enabled"),
-		rk.XML.connect(governor=dep.checkbox, client=dep.frame.R, set="enabled")#,
-# 		rk.XML.connect(governor=dep.checkbox, client=dep.frame.packages, set="enabled")
+		rk.XML.connect(governor=dep.opts, get="checked", client=dep.frame.RKWard, set="enabled"),
+		rk.XML.connect(governor=dep.opts, get="checked", client=dep.frame.R, set="enabled")#,
+# 		rk.XML.connect(governor=dep.opts, client=dep.frame.packages, set="enabled")
 	)
 
 ## JS code generation
 # author section
 js.opt.about.author.role <- rk.JS.options("optAuthorRole",
-	ite(aut.auth, qp("\"",aut.auth,"\"")),
-	ite(aut.maint, qp("\"",aut.maint,"\"")),
+	ite(aut.auth, qp("\"aut\"")),
+	ite(aut.maint, qp("\"cre\"")),
 	funct="c", option="role", collapse="")
 js.opt.about.author <- rk.JS.options("optAuthor",
 	ite(aut.given, qp("given=\"",aut.given,"\"")),
@@ -141,11 +145,12 @@
 	ite(pl.category, qp("category=\"",pl.category,"\"")),
 	funct="list", option="about", collapse=",\\n\\t")
 # dependencies section
+js.frm.dep.opts <- rk.JS.vars(dep.opts, modifiers="checked") # see to it frame is checked
 js.opt.about.dep <- rk.JS.options("optDependencies",
-	ite(id(dep.checkbox, " && ", dep.rkmin), qp("rkward.min=\"",dep.rkmin,"\"")),
-	ite(id(dep.checkbox, " && ", dep.rkmax), qp("rkward.max=\"",dep.rkmax,"\"")),
-	ite(id(dep.checkbox, " && ", dep.rmin), qp("R.min=\"",dep.rmin,"\"")),
-	ite(id(dep.checkbox, " && ", dep.rmax), qp("R.max=\"",dep.rmax,"\"")),
+	ite(id(js.frm.dep.opts, " && ", dep.rkmin), qp("rkward.min=\"",dep.rkmin,"\"")),
+	ite(id(js.frm.dep.opts, " && ", dep.rkmax), qp("rkward.max=\"",dep.rkmax,"\"")),
+	ite(id(js.frm.dep.opts, " && ", dep.rmin), qp("R.min=\"",dep.rmin,"\"")),
+	ite(id(js.frm.dep.opts, " && ", dep.rmax), qp("R.max=\"",dep.rmax,"\"")),
 	funct="list", option="dependencies", collapse=",\\n\\t")
 
 js.opt.skel.pluginmap <- rk.JS.options("optPluginmap",
@@ -173,9 +178,11 @@
 		ite(pl.name, echo("\n\tname=\"", pl.name, "\"")),
 		echo(js.opt.about.author),
 		echo(js.opt.about.about),
-		echo(js.opt.about.dep),
 	echo("\n)\n\n"),
+	ite(id(js.frm.dep.opts, " && ", js.opt.about.dep),
+		echo("plugin.dependencies <- rk.XML.dependencies(", js.opt.about.dep, "\n)\n\n")),
 	echo("plugin.dir <- rk.plugin.skeleton(\n\tabout=about.plugin,"),
+		ite(id(js.frm.dep.opts, " && ", js.opt.about.dep), echo("\n\tdependencies=plugin.dependencies,")),
 		echo(js.opt.skeleton),
 	echo("\n)\n\n"),
 	level=2)
@@ -184,6 +191,8 @@
 #plugin.dir <<- rk.plugin.skeleton(
 rk.plugin.skeleton(
 	about=about.info,
+	path=output.dir,
+	guess.getter=FALSE,
 	xml=list(
 		dialog=sklt.tabbook,
 		logic=logic.section),
@@ -193,6 +202,7 @@
 	pluginmap=list(name="Create RKWard plugin skeleton", hierarchy=list("file", "export")),
 	overwrite=TRUE,
 	create=c("pmap","xml","js","desc"),
+	dependencies=dependencies.info,
 	tests=FALSE,
 	show=TRUE,
 	edit=TRUE)

Modified: trunk/rkward/packages/rkwarddev/inst/NEWS.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/inst/NEWS.Rd	2013-02-20 19:15:30 UTC (rev 4545)
+++ trunk/rkward/packages/rkwarddev/inst/NEWS.Rd	2013-02-21 00:10:41 UTC (rev 4546)
@@ -9,14 +9,16 @@
         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
+      \item \code{rk.XML.pluginmap()}, \code{rk.XML.plugin()} and \code{rk.plugin.skeleton()} will now move <dependencies>
+        from <about> to a top level child node of plugin maps, with a warning
       \item the object class rk.JS.var gained a new slot \code{"getter"} to set a default JS function
         to query variable values. it defaults to \code{"getValue"} to ensure compatibility with earlier
-        releases. consequently, \code{rk.JS.vars()} and \code{rk.paste.JS()} have a new \code{"getter"} argument to set
+        releases. consequently, \code{rk.JS.vars()} and \code{rk.paste.JS()} have a new  \code{"getter"} argument to set
         or overwrite this value. another new argument, \code{"guess.getter"}, can be used to turn on
-        automatic guessing which getter function might be most appropriate.
+        automatic guessing which getter function might be most appropriate. this was also added to
+        \code{rk.plugin.component()} and \code{rk.plugin.skeleton()}.
       \item \code{rk.JS.scan()} learned how to treat <optionset> and <matrix>
+      \item updated the skeleton_dialog.R demo file and recreated the plugin code
     }
   }
   \subsection{added}{

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

Modified: trunk/rkward/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap
===================================================================
--- trunk/rkward/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap	2013-02-20 19:15:30 UTC (rev 4545)
+++ trunk/rkward/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap	2013-02-21 00:10:41 UTC (rev 4546)
@@ -1,13 +1,21 @@
 <!DOCTYPE rkpluginmap >
 <document 
-	namespace="rkward"
+	namespace="CreateRKWardpluginskeleton"
 	id="CreateRKWardpluginskeleton_rkward"
+	priority="medium"
 >
+	<!-- 
+		this code was generated using the rkwarddev package.
+			perhaps don't make changes here, but in the rkwarddev script instead! 
+	-->
+	<dependencies rkward_min_version="0.6.0">
+	</dependencies>
 	<about 
 		name="RKWard Plugin Skeleton"
 		shortinfo="GUI interface to create RKWard plugin skeletons"
-		version="0.04-2"
-		releasedate="2011-10-21"
+		longinfo="GUI interface to create RKWard plugin skeletons"
+		version="0.06-2"
+		releasedate="2013-02-21"
 		url="http://rkward.sf.net"
 		license="GPL (>= 3)"
 	>
@@ -17,27 +25,11 @@
 			email="meik.michalke at hhu.de"
 			role="aut, cre"
 		 />
-		<dependencies rkward_min_version="0.5.7">
-			<!-- 
-				<package 
-					name="CHANGE_ME_OR_DELETE_ME"
-					min_version="CHANGE_ME_OR_DELETE_ME"
-					max_version="CHANGE_ME_OR_DELETE_ME"
-					repository="CHANGE_ME_OR_DELETE_ME"
-				 /> 
-			-->
-			<!-- 
-				If this plugin depends on other pluginmaps, edit this part to your needs:
-
-				<pluginmap 
-					name="CHANGE_ME_OR_DELETE_ME"
-					url="CHANGE_ME_OR_DELETE_ME"
-				 /> 
-			-->
-		</dependencies>
 	</about>
 	<!-- 
-		<require file="path/file.pluginmap" /> 
+		<require 
+				file="path/file.pluginmap"
+			 /> 
 	-->
 	<components>
 		<component 
@@ -45,7 +37,8 @@
 			label="Create RKWard plugin skeleton"
 			type="standard"
 			file="plugins/CreateRKWardpluginskeleton.xml"
-		 />
+		>
+		</component>
 	</components>
 	<hierarchy>
 		<menu 
@@ -62,10 +55,10 @@
 	</hierarchy>
 	<!-- 
 		<context id="x11">
-		</context> 
+			</context> 
 	-->
 	<!-- 
 		<context id="import">
-		</context> 
+			</context> 
 	-->
 </document>

Modified: trunk/rkward/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.js
===================================================================
--- trunk/rkward/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.js	2013-02-20 19:15:30 UTC (rev 4545)
+++ trunk/rkward/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.js	2013-02-21 00:10:41 UTC (rev 4546)
@@ -1,3 +1,8 @@
+// this code was generated using the rkwarddev package.
+//perhaps don't make changes here, but in the rkwarddev script instead!
+
+
+
 function preprocess(){
 	// add requirements etc. here
 	echo("require(rkwarddev)\n");
@@ -25,20 +30,21 @@
 	var chcAddplRKW = getValue("chc_AddplRKW");
 	var chcShwthplg = getValue("chc_Shwthplg");
 	var drpPlcntpmn = getValue("drp_Plcntpmn");
-	var chcDfndpndn = getValue("chc_Dfndpndn");
 	var inpRKWardmn = getValue("inp_RKWardmn");
 	var inpRKWardmx = getValue("inp_RKWardmx");
 	var inpRmin = getValue("inp_Rmin");
 	var inpRmax = getValue("inp_Rmax");
-	// put the R code to be evaluated here
+	var frmDfndpndnChecked = getValue("frm_Dfndpndn.checked");
+
+	// the R code to be evaluated
 	// define the array arrOptAuthorRole for values of R option "role"
 	var arrOptAuthorRole = new Array();
 		if(chcAuthor) {
-			arrOptAuthorRole.push("\"" + chcAuthor + "\"");
-		} else {}
+			arrOptAuthorRole.push("\"aut\"");
+		}
 		if(chcMaintanr) {
-			arrOptAuthorRole.push("\"" + chcMaintanr + "\"");
-		} else {}
+			arrOptAuthorRole.push("\"cre\"");
+		}
 	// clean array arrOptAuthorRole from empty strings
 	arrOptAuthorRole = arrOptAuthorRole.filter(String);
 	// set the actual variable optAuthorRole with all values for R option "role"
@@ -52,16 +58,16 @@
 	var arrOptAuthor = new Array();
 		if(inpGivennam) {
 			arrOptAuthor.push("given=\"" + inpGivennam + "\"");
-		} else {}
+		}
 		if(inpFamilynm) {
 			arrOptAuthor.push("family=\"" + inpFamilynm + "\"");
-		} else {}
+		}
 		if(inpEmail) {
 			arrOptAuthor.push("email=\"" + inpEmail + "\"");
-		} else {}
+		}
 		if(optAuthorRole) {
 			arrOptAuthor.push(optAuthorRole);
-		} else {}
+		}
 	// clean array arrOptAuthor from empty strings
 	arrOptAuthor = arrOptAuthor.filter(String);
 	// set the actual variable optAuthor with all values for R option "author"
@@ -75,22 +81,22 @@
 	var arrOptAbout = new Array();
 		if(inpShrtdscr) {
 			arrOptAbout.push("desc=\"" + inpShrtdscr + "\"");
-		} else {}
+		}
 		if(inpVrsnnmbr) {
 			arrOptAbout.push("version=\"" + inpVrsnnmbr + "\"");
-		} else {}
+		}
 		if(inpRlsdtmpt) {
 			arrOptAbout.push("date=\"" + inpRlsdtmpt + "\"");
-		} else {}
+		}
 		if(inpHomepage) {
 			arrOptAbout.push("url=\"" + inpHomepage + "\"");
-		} else {}
+		}
 		if(inpLicense) {
 			arrOptAbout.push("license=\"" + inpLicense + "\"");
-		} else {}
+		}
 		if(inpCategory) {
 			arrOptAbout.push("category=\"" + inpCategory + "\"");
-		} else {}
+		}
 	// clean array arrOptAbout from empty strings
 	arrOptAbout = arrOptAbout.filter(String);
 	// set the actual variable optAbout with all values for R option "about"
@@ -102,18 +108,18 @@
 
 	// define the array arrOptDependencies for values of R option "dependencies"
 	var arrOptDependencies = new Array();
-		if(chcDfndpndn && inpRKWardmn) {
+		if(frmDfndpndnChecked && inpRKWardmn) {
 			arrOptDependencies.push("rkward.min=\"" + inpRKWardmn + "\"");
-		} else {}
-		if(chcDfndpndn && inpRKWardmx) {
+		}
+		if(frmDfndpndnChecked && inpRKWardmx) {
 			arrOptDependencies.push("rkward.max=\"" + inpRKWardmx + "\"");
-		} else {}
-		if(chcDfndpndn && inpRmin) {
+		}
+		if(frmDfndpndnChecked && inpRmin) {
 			arrOptDependencies.push("R.min=\"" + inpRmin + "\"");
-		} else {}
-		if(chcDfndpndn && inpRmax) {
+		}
+		if(frmDfndpndnChecked && inpRmax) {
 			arrOptDependencies.push("R.max=\"" + inpRmax + "\"");
-		} else {}
+		}
 	// clean array arrOptDependencies from empty strings
 	arrOptDependencies = arrOptDependencies.filter(String);
 	// set the actual variable optDependencies with all values for R option "dependencies"
@@ -127,7 +133,7 @@
 	var arrOptPluginmap = new Array();
 		if(drpPlcntpmn!= "test") {
 			arrOptPluginmap.push("hierarchy=\"" + drpPlcntpmn + "\"");
-		} else {}
+		}
 	// clean array arrOptPluginmap from empty strings
 	arrOptPluginmap = arrOptPluginmap.filter(String);
 	// set the actual variable optPluginmap with all values for R option "pluginmap"
@@ -141,28 +147,28 @@
 	var arrOptSkeleton = new Array();
 		if(brwDTEMPDIR) {
 			arrOptSkeleton.push("\n\tpath=\"" + brwDTEMPDIR + "\"");
-		} else {}
+		}
 		if(chcAddwzrds) {
 			arrOptSkeleton.push("\n\tprovides=c(\"logic\", \"dialog\", \"wizard\")");
-		} else {}
+		}
 		if(optPluginmap) {
 			arrOptSkeleton.push("\n\t" + optPluginmap);
-		} else {}
+		}
 		if(chcOvrwrtxs) {
 			arrOptSkeleton.push("\n\toverwrite=TRUE");
-		} else {}
+		}
 		if(chcIncldplg) {
 			arrOptSkeleton.push("\n\ttests=TRUE");
-		} else {}
+		}
 		if(chcOpnflsfr) {
 			arrOptSkeleton.push("\n\tedit=TRUE");
-		} else {}
+		}
 		if(chcAddplRKW) {
 			arrOptSkeleton.push("\n\tload=TRUE");
-		} else {}
+		}
 		if(chcShwthplg) {
 			arrOptSkeleton.push("\n\tshow=TRUE");
-		} else {}
+		}
 	// clean array arrOptSkeleton from empty strings
 	arrOptSkeleton = arrOptSkeleton.filter(String);
 	// set the actual variable optSkeleton with all values for R option ""
@@ -175,18 +181,25 @@
 	echo("about.plugin <- rk.XML.about(");
 	if(inpPluginnm) {
 		echo("\n\tname=\"" + inpPluginnm + "\"");
-	} else {}
+	}
 	echo(optAuthor);
 	echo(optAbout);
-	echo(optDependencies);
 	echo("\n)\n\n");
+	if(frmDfndpndnChecked && optDependencies) {
+		echo("plugin.dependencies <- rk.XML.dependencies(" + optDependencies + "\n)\n\n");
+	}
 	echo("plugin.dir <- rk.plugin.skeleton(\n\tabout=about.plugin,");
+	if(frmDfndpndnChecked && optDependencies) {
+		echo("\n\tdependencies=plugin.dependencies,");
+	}
 	echo(optSkeleton);
 	echo("\n)\n\n");
 }
 
 function printout(){
 	// printout the results
-	echo("rk.header(\"Create RKWard plugin skeleton results\", level=1)\n");
-	echo("rk.print(\"\")\n");
-}
\ No newline at end of file
+	echo("rk.header(\"Create RKWard plugin skeleton results\")\n");
+echo("rk.print(\"\")\n");
+
+}
+

Modified: trunk/rkward/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.xml
===================================================================
--- trunk/rkward/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.xml	2013-02-20 19:15:30 UTC (rev 4545)
+++ trunk/rkward/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.xml	2013-02-21 00:10:41 UTC (rev 4546)
@@ -1,17 +1,19 @@
 <!DOCTYPE rkplugin >
 <document>
+	<!-- this code was generated using the rkwarddev package.
+			perhaps don't make changes here, but in the rkwarddev script instead! -->
 	<code file="CreateRKWardpluginskeleton.js" />
 	<help file="CreateRKWardpluginskeleton.rkh" />
 	<include file="../RKWardPluginSkeleton.pluginmap" />
 	<logic>
-		<connect governor="chc_Dfndpndn.state" client="frm_DpndsRKW.enabled" />
-		<connect governor="chc_Dfndpndn.state" client="frm_DpndsnRv.enabled" />
+		<connect governor="frm_Dfndpndn.checked" client="frm_DpndsRKW.enabled" />
+		<connect governor="frm_Dfndpndn.checked" client="frm_DpndsnRv.enabled" />
 	</logic>
 	<dialog label="RKWard Plugin Skeleton">
 		<tabbook id="tbbk_PlgnSklt" label="Plugin Skeleton">
 			<tab label="About the plugin" id="tab_Abtthplg">
 				<column id="clm_fAAPPLLGPL">
-					<frame label="About the plugin" checkable="false" id="frm_Abtthplg">
+					<frame label="About the plugin" id="frm_Abtthplg">
 						<row id="row_inPPLLGPL3">
 							<input label="Plugin name" id="inp_Pluginnm" size="small" required="true" />
 							<input label="License" id="inp_License" initial="GPL (>= 3)" required="true" />
@@ -28,7 +30,7 @@
 							<input label="Category" id="inp_Category" />
 						</row>
 					</frame>
-					<frame label="Plugin author" checkable="false" id="frm_Plugnthr">
+					<frame label="Plugin author" id="frm_Plugnthr">
 						<row id="row_cGGFFEEGGF">
 							<column id="clm_inptGGFFEE">
 								<input label="Given name" id="inp_Givennam" required="true" />
@@ -37,9 +39,9 @@
 								<stretch />
 							</column>
 							<column id="clm_frmlAAAAMM">
-								<frame label="Author roles" checkable="false" id="frm_Authrrls">
-									<checkbox id="chc_Author" label="Author" value="aut" checked="true" />
-									<checkbox id="chc_Maintanr" label="Maintainer" value="cre" checked="true" />
+								<frame label="Author roles" id="frm_Authrrls">
+									<checkbox id="chc_Author" label="Author" value="true" checked="true" />
+									<checkbox id="chc_Maintanr" label="Maintainer" value="true" checked="true" />
 									<stretch />
 								</frame>
 							</column>
@@ -49,7 +51,7 @@
 			</tab>
 			<tab label="Create options" id="tab_Cretptns">
 				<column id="clm_fDTEMPDIRD">
-					<frame checkable="false" id="frm_rDTEMPDIRD">
+					<frame id="frm_rDTEMPDIRD">
 						<row id="row_bDTEMPDIRD">
 							<browser label="Directory to save to (empty for $TEMPDIR)" type="dir" id="brw_DTEMPDIR" required="false" />
 						</row>
@@ -85,17 +87,14 @@
 							</dropdown>
 						</row>
 					</frame>
-					<frame label="Dependencies" checkable="false" id="frm_Depndncs">
-						<row id="row_chckbxdcDD">
-							<checkbox id="chc_Dfndpndn" label="Define dependencies" value="true" />
-						</row>
+					<frame label="Define dependencies" checkable="true" checked="false" id="frm_Dfndpndn">
 						<row id="row_fDRKWDRKWR">
-							<frame label="Depends on RKWard version" checkable="false" id="frm_DpndsRKW">
+							<frame label="Depends on RKWard version" id="frm_DpndsRKW">
 								<input label="RKWard min" id="inp_RKWardmn" size="small" />
 								<input label="RKWard max" id="inp_RKWardmx" size="small" />
 								<stretch />
 							</frame>
-							<frame label="Depends on R version" checkable="false" id="frm_DpndsnRv">
+							<frame label="Depends on R version" id="frm_DpndsnRv">
 								<input label="R min" id="inp_Rmin" size="small" />
 								<input label="R max" id="inp_Rmax" size="small" />
 								<stretch />

Modified: trunk/rkward/packages/rkwarddev/man/rk.JS.scan.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.JS.scan.Rd	2013-02-20 19:15:30 UTC (rev 4545)
+++ trunk/rkward/packages/rkwarddev/man/rk.JS.scan.Rd	2013-02-21 00:10:41 UTC (rev 4546)
@@ -21,7 +21,10 @@
 
   \item{guess.getter}{Logical, if \code{TRUE} try to get a
   good default getter function for JavaScript variable
-  values.}
+  values. This will use some functions which were added
+  with RKWard 0.6.1, and therefore raise the dependencies
+  for your plugin/component accordingly. Nonetheless, it's
+  recommended.}
 
   \item{indent.by}{Character string used to indent each
   entry if \code{js=TRUE}.}

Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.frame.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.frame.Rd	2013-02-20 19:15:30 UTC (rev 4545)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.frame.Rd	2013-02-21 00:10:41 UTC (rev 4546)
@@ -1,6 +1,6 @@
 \name{rk.XML.frame}
 \alias{rk.XML.frame}
-\title{Create XML node "column" for RKWard plugins}
+\title{Create XML node "frame" for RKWard plugins}
 \usage{
   rk.XML.frame(..., label = NULL, checkable = FALSE,
     chk = TRUE, id.name = "auto")
@@ -28,7 +28,7 @@
   An object of class \code{XiMpLe.node}.
 }
 \description{
-  Create XML node "column" for RKWard plugins
+  Create XML node "frame" for RKWard plugins
 }
 \examples{
 test.dropdown <- rk.XML.dropdown("mydrop",

Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.plugin.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.plugin.Rd	2013-02-20 19:15:30 UTC (rev 4545)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.plugin.Rd	2013-02-21 00:10:41 UTC (rev 4546)
@@ -5,7 +5,8 @@
   rk.XML.plugin(name, dialog = NULL, wizard = NULL,
     logic = NULL, snippets = NULL, provides = NULL,
     help = TRUE, pluginmap = NULL, label = NULL,
-    clean.name = TRUE, about = NULL, gen.info = TRUE)
+    clean.name = TRUE, about = NULL, dependencies = NULL,
+    gen.info = TRUE)
 }
 \arguments{
   \item{name}{Character string, the name of the plugin.
@@ -58,13 +59,17 @@
   (\code{"_"}) will be removed from \code{name}.}
 
   \item{about}{An object of class \code{XiMpLe.node} with
-  descriptive information on the plugin, its authors and
-  dependencies, see
-  \code{link[XiMpLe:rk.XML.about]{rk.XML.about}} for
+  descriptive information on the plugin and its authors,
+  see \code{link[XiMpLe:rk.XML.about]{rk.XML.about}} for
   details. Only useful for information that differs from
   the \code{<about>} section of the \code{.pluginmap} file.
   Skipped if \code{NULL}.}
 
+  \item{dependencies}{An object of class \code{XiMpLe.node}
+  to be pasted as the \code{<dependencies>} section, See
+  \code{\link[rkwarddev:rk.XML.dependencies]{rk.XML.dependencies}}
+  for details. Skipped if \code{NULL}.}
+
   \item{gen.info}{Logical, if \code{TRUE} a comment note
   will be written into the document, that it was generated
   by \code{rkwarddev} and changes should be done to the

Modified: trunk/rkward/packages/rkwarddev/man/rk.plugin.component.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.plugin.component.Rd	2013-02-20 19:15:30 UTC (rev 4545)
+++ trunk/rkward/packages/rkwarddev/man/rk.plugin.component.Rd	2013-02-21 00:10:41 UTC (rev 4546)
@@ -5,9 +5,9 @@
   rk.plugin.component(about, xml = list(), js = list(),
     rkh = list(), provides = c("logic", "dialog"),
     scan = c("var", "saveobj", "settings"),
-    hierarchy = "test", pluginmap = NULL,
-    create = c("xml", "js", "rkh"), gen.info = TRUE,
-    indent.by = "\t")
+    guess.getter = FALSE, hierarchy = "test",
+    pluginmap = NULL, create = c("xml", "js", "rkh"),
+    gen.info = TRUE, indent.by = "\t")
 }
 \arguments{
   \item{about}{Either a character string with the name of
@@ -79,6 +79,14 @@
   section manually by the \code{rkh} option (see below).}
   }}
 
+  \item{guess.getter}{Logical, if \code{TRUE} try to get a
+  good default getter function for JavaScript variable
+  values (if \code{scan} is active). This will use some
+  functions which were added with RKWard 0.6.1, and
+  therefore raise the dependencies for your
+  plugin/component accordingly. Nonetheless, it's
+  recommended.}
+
   \item{hierarchy}{A character vector with instructions
   where to place this component in the menu hierarchy, one
   list or string.  Valid single values are \code{"file"},

Modified: trunk/rkward/packages/rkwarddev/man/rk.plugin.skeleton.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.plugin.skeleton.Rd	2013-02-20 19:15:30 UTC (rev 4545)
+++ trunk/rkward/packages/rkwarddev/man/rk.plugin.skeleton.Rd	2013-02-21 00:10:41 UTC (rev 4546)
@@ -4,18 +4,20 @@
 \usage{
   rk.plugin.skeleton(about, path = tempdir(),
     provides = c("logic", "dialog"),
-    scan = c("var", "saveobj", "settings"), xml = list(),
-    js = list(), pluginmap = list(), rkh = list(),
-    overwrite = FALSE, tests = TRUE, lazyLoad = TRUE,
+    scan = c("var", "saveobj", "settings"),
+    guess.getter = FALSE, xml = list(), js = list(),
+    pluginmap = list(), rkh = list(), overwrite = FALSE,
+    tests = TRUE, lazyLoad = TRUE,
     create = c("pmap", "xml", "js", "rkh", "desc", "clog"),
     suggest.required = TRUE, components = list(),
-    edit = FALSE, load = FALSE, show = FALSE,
-    gen.info = TRUE, indent.by = "\t")
+    dependencies = NULL, edit = FALSE, load = FALSE,
+    show = FALSE, gen.info = TRUE, hints = TRUE,
+    indent.by = "\t")
 }
 \arguments{
   \item{about}{Either an object of class \code{XiMpLe.node}
-  with descriptive information on the plugin, its authors
-  and dependencies (see
+  with descriptive information on the plugin and its
+  authors (see
   \code{link[XiMpLe:rk.XML.about]{rk.XML.about}} for
   details), or a character string with the name of the
   plugin package.  If the latter, no \code{DESCRIPTION}
@@ -50,6 +52,14 @@
   section manually by the \code{rkh} option (see below).}
   }}
 
+  \item{guess.getter}{Logical, if \code{TRUE} try to get a
+  good default getter function for JavaScript variable
+  values (if \code{scan} is active). This will use some
+  functions which were added with RKWard 0.6.1, and
+  therefore raise the dependencies for your
+  plugin/component accordingly. Nonetheless, it's
+  recommended.}
+
   \item{xml}{A named list of options to be forwarded to
   \code{\link[rkwarddev:rk.XML.plugin]{rk.XML.plugin}}, to
   generate the GUI XML file.  Not all options are supported
@@ -129,6 +139,11 @@
   \code{\link[rkwarddev:rk.XML.component]{rk.XML.component}}
   for details.}
 
+  \item{dependencies}{An object of class \code{XiMpLe.node}
+  to be pasted as the \code{<dependencies>} section, See
+  \code{\link[rkwarddev:rk.XML.dependencies]{rk.XML.dependencies}}
+  for details. Skipped if \code{NULL}.}
+
   \item{edit}{Logical, if \code{TRUE} RKWard will
   automatically open the created files for editing, by
   calling \code{rk.edit.files}.  This applies to all files
@@ -151,6 +166,10 @@
   were generated by \code{rkwarddev} and changes should be
   done to the script.}
 
+  \item{hints}{Logical, if \code{TRUE} and you leave out
+  optional entries (like \code{dependencies=NULL}), dummy
+  sections will be added as comments.}
+
   \item{indent.by}{A character string defining the
   indentation string to use.}
 }

Modified: trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd	2013-02-20 19:15:30 UTC (rev 4545)
+++ trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd	2013-02-21 00:10:41 UTC (rev 4546)
@@ -9,7 +9,7 @@
 \details{
   \tabular{ll}{ Package: \tab rkwarddev\cr Type: \tab
   Package\cr Version: \tab 0.06-2\cr Date: \tab
-  2013-02-20\cr Depends: \tab R (>= 2.9.0),methods,XiMpLe
+  2013-02-21\cr Depends: \tab R (>= 2.9.0),methods,XiMpLe
   (>= 0.03-18),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





More information about the rkward-tracker mailing list