diff options
author | Sze Howe Koh <szehowe.koh@gmail.com> | 2014-05-14 22:33:34 +0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-16 03:45:07 +0200 |
commit | ea401b8ebff8ee58f6db7b1c623883a72365a2b8 (patch) | |
tree | 9156aee24509c117d111ba41c6fa66067ab5ea33 /src/qml/doc/src/qmllanguageref/documents | |
parent | d3064953f12d780e06578d97990533c93b3c2781 (diff) |
Doc: Describe property bindings in terms of relationships
- This patch aims to help readers think about bindings more
"declaratively" by introducing a new (albeit very leaky) level of
abstraction: Treat bindings as finitary relations, rather than mere
JavaScript expressions.
- In essence, property bindings are for describing relationships between
properties. The fact that the QML engine reactively updates a
property's value when its dependencies change, and the fact that
arbitrarily complex expressions are valid bindings, are simply
implementation details.
- Discourage the use of side effects in property bindings. They are not
essential for the main purpose of property bindings, they break the
finitary relation model, and their use can reduce code
readability/maintainability/toolability.
- Discourage complex property bindings for similar reasons.
Change-Id: I5a0a03bd02768d4c504797a0f86569f3ac066e96
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/qml/doc/src/qmllanguageref/documents')
-rw-r--r-- | src/qml/doc/src/qmllanguageref/documents/scope.qdoc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/qml/doc/src/qmllanguageref/documents/scope.qdoc b/src/qml/doc/src/qmllanguageref/documents/scope.qdoc index 845ca30b4f..af59afe1fb 100644 --- a/src/qml/doc/src/qmllanguageref/documents/scope.qdoc +++ b/src/qml/doc/src/qmllanguageref/documents/scope.qdoc @@ -105,11 +105,9 @@ ListView { \section1 Binding Scope Object -Property bindings are the most common use of JavaScript in QML. Property -bindings associate the result of a JavaScript expression with a property of an -object. The object to which the bound property belongs is known as the binding's -scope object. In this QML simple declaration the \l Item object is the -binding's scope object. +An object which has a \l{Property Binding}{property binding} is known has the +binding's \e{scope object}. In the following example, the \l Item object is +the binding's scope object. \code Item { |