Learn R Programming

traitr (version 0.13)

Item: Base Trait for an Item...

Description

Base Trait for an Item

Arguments

Details

An Item combines a model, view and controller interface into one convenient package. Items may be combined into an ItemGroup or a Dialog to be shown.

The make_ui method creates the user interface, initializes the model and the controller. The init_model, init_controller and init_ui do the work.

The model may be shared with different items. See set_model_from_item or the instance proto method.

Items implement the observer interface, so one can add observers to listen for changes to the properties. (Properties are listed in the property "properties".)

Items use the Adpater interface to link the model with the view (an Editor). The "properties" property lists the names of model properties. One should use "value" for the special one to be returned by the method to_R. (This method gathers values from the items after coercion)

When an item's user interface is made, the method on_realized is called.