Troubleshooting bindings

Here you can find the error messages that 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

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

Kanzi cannot parse the binding expression because it contains a syntax error.

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

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

The max() function parameters must be separated by a comma. See max (maximum).

Assign a value to the identifier before you use it

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

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

For example, in the above binding expression, the variable k is not defined.

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

Assign a value for the variable k.

Invalid argument

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

A function in the binding expression has too many parameters.

For example, in the above binding expression, the pow() function has three parameters.

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

The pow() function takes two parameters. See pow (power).

Invalid argument data type for the operation

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

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

For example, in the above binding expression, the rotateX() function parameters are both integers.

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

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

The attribute is not a valid property field of the property

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

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

For example, in the above binding expression, Translation is not a defined property field of the Layout Transformation property.

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

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

Invalid result data type

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

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

For example, in the above binding expression, the createRotationX() function returns a quaternion data type while the target property supports the string, integer, float, and boolean data types. See createRotationX.

../../_images/invalid-result-data-type-fixed.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.

Operation is not a valid binding operation

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

The function in the binding expression does not exist.

For example, there is no function mx().

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

Use an existing function. See Functions.

Set the target property type

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

The target property type for the binding is not defined.

For example, in the above binding, the target property is not set.

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

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

Cannot find item

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

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 the above binding expression, the relative path to the Slider 3D node is not correct.

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

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

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

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

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

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

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

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

See also

Bindings expressions reference

Using bindings