Language
Edit

IDataSource.SetValue(String, Object, Boolean) Method

Definition

Set the value associated with the specified key path

public void SetValue(string resolvedKeyPath, object value, bool isAtomicChange = false);
abstract member SetValue : string * obj * bool -> unit
Public Sub SetValue (resolvedKeyPath As String, value As Object, Optional isAtomicChange As Boolean = false)

Parameters

resolvedKeyPath
String

The fully resolved key path for the variable to change.

value
Object

The new value to set at that key path.

isAtomicChange
Boolean

Whether this is the only change and should be automatically be bracketed by DataChangeSetBegin/End().

Remarks

CAUTION: If isAtomicChange is omitted or passed as false, there MUST be a DataChangeSetBegin() and DataChangeSetEnd() method calls bracketing this. If not done, certain DataConsumers that only process as a batch (like TMPro) will not update the presented information.

This is currently useful when the data embedding is being used for local, realtime changes of presented information.

The fullyQualifiedPrefix is provided for lists (or collection of lists) to find the correct instance of a specific local key path. If not processing a collection, this can be either null or "". It is considered fully qualified because it has been resolved to the namespaces of the data source where each sub-component may have been mapped from a view key path to a data key path. This means that the path may not be recognizable on casual observation relative to the key path variables embedded in views and sub-views.

Although not fully implemented yet, it could also be used to persist changes to a back-end data store of some kind, such as might be useful for a data entry form.

Applies to