property bindMethod

(r/w) string bindMethod;

Typ

Zugriff

This property sets and gets the 'method' attribute of the binding. The default bind method varies depending on the data source and the capabilities of the data source (for example whether or not it is read only, or whether or not it has sufficient means of providing data change notifications to the binding framework). The values can be:
function onSample()
{
    var sourceBox = scene.getBoxById("mySourceBox");
    var box  = scene.getBoxById("myBox");
    if (box && sourceBox)
    {
        var binding = box.getDataBinding("myBinding");
        if (binding)
        {
            binding.elementSource = sourceBox;
            binding.path = "value";
            binding.bindMethod = "twoWay";
            binding.connect();
        }
    }
}