Troubleshooting bindings

Here you can find the error messages which the Binding Editor displays when there is an error in a binding. See Bindings expressions reference.

Error

Problem

Solution

Cannot parse the binding expression because of a syntax error

Kanzi cannot parse the binding expression you entered in the Binding Editor because it contains a syntax error.

For example, in this binding expression the parameters of a function are not separated by a comma:

../../_images/syntax-error-message.png

The MAX() function parameters must be separated by a comma.

../../_images/syntax-error-message-fixed.png

Assign a value to the identifier before you use it

The binding expression contains a variable which does not have an assigned value.

For example, in this binding expression the variable k is not defined:

../../_images/identifier-error-message.png

Assign a value for the variable k.

../../_images/identifier-error-fixed.png

Invalid argument

A function in the binding expression has too many parameters.

For example, in this binding expression the POW() function has three parameters:

../../_images/invalid-argument-error-message.png

The POW() function takes two parameters.

../../_images/invalid-argument-fixed.png

Invalid argument data type for the operation

A function parameter in the binding expression has an unsupported data type.

For example, in this binding expression the RotateX() function parameters are both integers:

../../_images/invalid-argument-data-type-error.png

The RotateX() function takes the property field of a property as the first parameter, and an integer as the second parameter.

../../_images/invalid-argument-data-type-fixed.png

The attribute is not a valid property field of the property

A property in the binding expression is using an invalid property field.

For example, in this binding Translation is not a defined property field of the Layout Transformation property:

../../_images/invalid-attribute-error.png

Use the Translation X, Translation Y, or Translation Z property field of the Layout Transformation property.

../../_images/invalid-attribute-fixed.png

Invalid result data type

The function in the binding expression returns a data type which does not match the data type of the target property.

For example, in this binding the CreateRotationX() function returns a quaternion data type while the target property supports the string, integer, float, and boolean data types:

../../_images/invalid-result-data-type-error.png

In the Binding Editor set:

  • Property to a target property with a property field that supports the data type which the function in the binding expression returns.

  • Property Field to a property field of the target property that supports the data type which the function in the binding expression returns.

    For example, set it to Rotation to use the quaternion data type.

../../_images/invalid-result-data-type-fixed.png

Operation is not a valid binding operation

The function in the binding expression does not exist.

For example, there is no function MX():

../../_images/invalid-operation-error.png

Use an existing function. See Bindings expressions reference.

../../_images/invalid-operation-fixed.png

Set the target property type

The target property type for the binding is not defined.

For example, in this binding the target property is not set:

../../_images/null-target-property-error.png

In the Binding Editor set the Property to the property to which you want to bind.

For example, set it to Text.

../../_images/null-target-property-fixed.png

Cannot find item

The binding tries to refer to a node or property type in the project but cannot find that node or property type.

For example, in this binding the relative path to the Slider 3D node is not correct:

../../_images/node-not-found-error.png

Make sure that the relative path to the node or property type points to the correct place.

../../_images/node-not-found-fixed.png

Tip

When you use the @ sign in a binding expression before the path to a node, Kanzi Studio:

  • Checks whether the path is valid and shows an error message in the Binding Editor if the path is not valid.

  • Updates the path in the binding expression whenever the location between the source and the target nodes in the node tree changes.

With the @ sign you can create bindings only within the same prefab, not between prefabs.

Cannot use target property in the binding expression

A binding expression, which tries to modify the current value of a property, uses the target property.

For example, these binding expressions try to modify the values of the Layout Width and Render Transformation properties of the node:

../../_images/getcurrentvalue-error-1.png ../../_images/getcurrentvalue-error-2.png

In a binding expression that modifies the current value of a target property use the GetCurrentValue() function to get the value.

../../_images/getcurrentvalue-fixed-1.png ../../_images/getcurrentvalue-fixed-2.png