rk.XML.valueslot: Create a XML node "valueslot" for RKWard plugins

View source: R/rk.XML.valueslot.R

rk.XML.valueslotR Documentation

Create a XML node "valueslot" for RKWard plugins

Description

Create a XML node "valueslot" for RKWard plugins

Usage

rk.XML.valueslot(
  label,
  source,
  property = NULL,
  required = FALSE,
  multi = FALSE,
  duplicates = FALSE,
  min = 1,
  any = 1,
  max = 0,
  id.name = "auto",
  help = NULL,
  component = rk.get.comp(),
  i18n = NULL
)

Arguments

label

Character string, a text label for the valueslot.

source

Either a character string (the id name of the valueselector to select values from), or an object of class XiMpLe.node (whose id will be extracted and used). If it is not a <valueselector> node, you must also specify a valid property for the node.

property

Character string, valid property for a XiMpLe node defined by source. In the XML code, it will cause the use of source_property instead of source. Only used if source is not a <valueselector> node.

required

Logical, whether the selection of values is mandatory or not.

multi

Logical, whether the valueslot holds only one or several objects.

duplicates

Logical, if multi=TRUE defines whether the same entry may be added multiple times. Sets multi=TRUE.

min

If multi=TRUE defines how many objects must be selected. Sets multi=TRUE.

any

If multi=TRUE defines how many objects must be selected at least if any are selected at all. Sets multi=TRUE.

max

If multi=TRUE defines how many objects can be selected in total (0 means any number). Sets multi=TRUE.

id.name

Character vector, unique ID for the valueslot. If "auto", the ID will be generated automatically from label.

help

Character string or list of character values and XiMpLe nodes, will be used as the text value for a setting node in the .rkh file. If set to FALSE, rk.rkh.scan will ignore this node. Also needs component to be set accordingly!

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 help to be set accordingly, too!

i18n

Either a character string or a named list with the optional elements context or comment, to give some i18n_context information for this node. If set to FALSE, the attribute label will be renamed into noi18n_label.

Value

An object of class XiMpLe.node.

See Also

rk.XML.values, rk.XML.valueselector, and the Introduction to Writing Plugins for RKWard

Examples

## Not run: 
test.valueselector <- rk.XML.valueselector("Select some values")
test.valueslot <- rk.XML.valueslot("Vars go here", source=test.valueselector)
cat(pasteXML(test.valueslot))

## End(Not run)

rkward-community/rkwarddev documentation built on May 9, 2022, 3:02 p.m.