Create an Observer for Reactive Methods
observer.RdWraps a method so it reacts to property changes. Used inside the
methods list of createWidget() to declare which properties
trigger the method.
Value
A ts_observer object used by createWidget().
Examples
if (FALSE) { # \dontrun{
createWidget("Example",
properties = list(x = ts_integer(1L, default = 0L)),
methods = list(
on_x = observer("x", function() {
cat("x changed to", .self$x, "\n")
})
)
)
} # }