Binding is the ability of one item's property, trigger parameter or action parameter - aka the "target" - to mirror the value of a different item's property, trigger parameter or action parameter - aka the "source". Whenever the source changes, the target changes as well. Uses are virtually infinite but examples include:
- Design-time example: Place an Image asset containing your company logo on all scenes, binding the X and Y property of this Image asset on spaces 2 thru the end of the experience to the X and Y property of the logo on the first scene. Moving the position of the logo on the first scene will cause the logo to move on all other scenes.
- Runtime example: Create an interface asset for a weather service. Using binding, take a city name entered by a user and push it up to the weather service. In response, use binding to take weather information returned by the service and display it in your experience. This is how the Weather interface asset works.
The binding concept is related to the well-understood and proven computing model:
WHEN this [happens] THEN [do] that
Applied to the specific instance of binding a value of Item B to a value of Item A, it becomes:
WHEN value of A changes THEN change value of B
The possible variants of binding in Intuiface are:
- Property to Property (P2P)
- Trigger Parameter to Property (T2P)
- Action Parameter to Property (A2P)
This is represented by the blue arrows in the diagram below:
To investigate each variant in detail:
- Properties and trigger/action parameters can be bound from/to any other property/trigger parameter/action parameter, regardless of type - e.g. integer, string, true/false. Intuiface does not verify if property/parameter values are compatible. Beware of weird behavior if you bind properties of different types.
- It is not possible to bind from / to :
- scene background properties (color, source of image, video ...)
- style properties of all assets (i.e. "book", "horizontal", or "vertical" for a Document asset's Style property)
- container properties of all assets (i.e. "static", "pin", or "default" for assets in each layer)
- timer triggers (thus it is not possible to pass the timer's duration into an Interface asset.)
- gesture trigger parameters (e.g. "grab", "east", "west", etc.)
- general and navigation actions (e.g. "go to space", "flip screen", etc.)
- Bindings are broken if you copy / paste bound assets from one instance of Intuiface Composer to another on the same PC.
- When a binding is deleted, the latest bound property value is retained by Composer.
- Bindings are not possible on imported files which names are starting with a dot (.) character.
- Bindings are not resolved for Groups opened from a Data Feed - Collection using "Tap to open" behavior.