rk.XML.connect: Create XML node "connect" for RKWard plugins

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

rk.XML.connectR Documentation

Create XML node "connect" for RKWard plugins

Description

If you define a XiMpLe.node object as governor which is not a <convert> node and not=FALSE, the function will automatically append to its id.

Usage

rk.XML.connect(
  governor,
  client,
  get = "state",
  set = "enabled",
  not = FALSE,
  reconcile = FALSE
)

Arguments

governor

Either a character string (the id of the property whose state should control the client), or an object of class XiMpLe.node (whose id will be extracted and used). Usually a <convert> node defined earlier (see rk.XML.convert).

client

Either a character string (the id if the element to be controlled by governor)m an object of class XiMpLe.node (whose id will be extracted and used), or an object of class rk.plug.comp (whose name will be used).

get

Character string, a valid modifier for the node property of governor, often the ".state" value of some apropriate node. If set to an empty "", no modifier will be appended.

set

Character string, a valid modifier for the node property of client, usually one of "enabled", "visible" or "required". If you provide an <external> node instead, its ID will be used as the modifier without validation (see above).

not

Logical, if TRUE, the state of governor (TRUE/FALSE) will be inversed.

reconcile

Logical, forces the governor to only accept values which are valid for the client as well.

Value

An object of class XiMpLe.node.

Connect embedded plugins

To connect to properties of embedded plugins, the validity check of the set modifier needs to be skipped. You do this by providing an <external> XiMpLe node instead, whose ID is then taken unvalidated. This can be useful in combination with rk.plug.comp object provided as client.

Note

To get a list of the implemented modifiers in this package see modifiers.

See Also

rk.XML.convert, rk.XML.external, rk.XML.logic, rk.XML.set, rk.XML.switch, modifiers, and the Introduction to Writing Plugins for RKWard

Examples

test.connect <- rk.XML.connect(governor="lgc_foobar", client="frame_bar")
cat(pasteXML(test.connect))

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