CallbackFunction-class {Combinations}R Documentation

Class "CallbackFunction" acting as an event handler or callback function.

Description

The idea of this is to have a function that acts as an asynchronous event handler or a method for a mutable object in the sense of a Java, C++ or Python. We can use this as a regular function in R, but we can also use convenience functions (\$ and names) to access the environment of the function and the mutable, dynamic variables.

Objects from the Class

Objects can be created by calls of the form new("CallbackFunction", function(...) # body). These are regular function objects with the additional methods for accessing the mutable values associated with them and their environment.

Slots

.Data:
Object of class "function"

Extends

Class "function", from data part. Class "OptionalFunction", by class "function". Class "PossibleMethod", by class "function".

Methods

$
signature(x = "CallbackFunction"): access a particular variable in the function's environment.
names
signature(x = "CallbackFunction"): get a list of all the objects in the function's environment.

Author(s)

Duncan Temple Lang <duncan@wald.ucdavis.edu>

References

S4 classes and methods.

See Also

names $


[Package Combinations version 0.2-0 Index]