From 5c1fdea704a21712e6326d5c527cd6e36561693d Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Fri, 5 Jan 2018 16:49:18 +0100 Subject: [PATCH] doc: property inheritance --- resources/docs/extras/property-inheritance.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/docs/extras/property-inheritance.md b/resources/docs/extras/property-inheritance.md index a21d55cd..237d8f40 100644 --- a/resources/docs/extras/property-inheritance.md +++ b/resources/docs/extras/property-inheritance.md @@ -6,12 +6,18 @@ Widgets can use each other's property values by using the following syntaxes: - `@{parent.propertyName}` - `@{widgetId.propertyName}` (where `widgetId` is the target widget's `id`) +`propertyName` can be any of the target widget's properties. Additionally, the special property name `_value` refers to a widget's value, as opposed to its `value` property. + It can be used to: - concatenate strings: `/@{parent.id}/some_suffix` - define object value: `["@{parent.id}"]` -If the retreived property is an object (`[] / {}`), it can be used as is or one can retreive a specfic item from it: `@{parent.variables.0}` will try to return the first item of the parent's `variables` property. +If the retreived property is an object (`[] / {}`), a subset can be defined by appending a dot and a key (array index or object key) : `@{parent.variables.key}` !!! note "" The root panel's `id` is `root`. + + +!!! warning "What about reverse inheritance ?" + Containers cannot inherit their children's properties but to define their `value` property.