getBinding: Get Binding Function (generic)

Description Usage Arguments Details Author(s) References See Also Examples

Description

Retrieves the binding function by which a reactive object is bound to other referenced reactive objects.

Usage

1
getBinding(id, where = parent.frame(), ...)

Arguments

id

Signature argument. Object containing name/ID information.

where

Signature argument. Object containing location information.

...

Further arguments to be passed to subsequent functions/methods.

Details

This is a convenience function to retrieve the value of field .func from the invisible objects stored in the registry.

Author(s)

Janko Thyson janko.thyson@rappster.de

References

http://github.com/Rappster/reactr

See Also

getBinding-character-environment-method

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 

## Start with fresh registry //
resetRegistry()

## Reactive object w/o references //
setReactive(id = "x_1", value = 10)
(binding <- getBinding(id = "x_1"))
identical(binding, getFromRegistry("x_1")$.func)

## Reactive object with references //
setReactive(id = "x_2", value = function() "object-ref: {id: x_1}")
(binding <- getBinding(id = "x_2"))
identical(binding, getFromRegistry("x_2")$.func)

## Clean up //
rmReactive("x_1")
rmReactive("x_2")


## End(Not run)

rappster/reactr documentation built on May 26, 2019, 11:56 p.m.