make_default_binding: Create a default binding (prototype) for a given field in a...

Description Usage Arguments Value

Description

Before fields are initialized in reference classes, they should be initialized to some value. If this is not done in the constructor, it is the responsibility of this function to give a default value.

Usage

1
make_default_binding(field_name, field_class, read_only = FALSE, where)

Arguments

field_name

character. The name of the field.

field_class

character. The class of the field.

read_only

logical. Whether or not this field should be read-only. The default is FALSE.

where

environment. The environment in which to create the field binding.

Value

a list consisting of a defaultBindingFunction and a uninitializedField if the field_class refers to a virtual class or new(field_class) otherwise.


robertzk/refclass documentation built on May 27, 2019, 10:36 a.m.