diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-02-03 07:40:00 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-02-03 07:40:00 (GMT) |
commit | cb16e0adba54015963f2cd8a3f0188965c0c9ef8 (patch) | |
tree | f8bd04e549899b30658ff9cde26a0e8870f62847 /doc/src/declarative/advtutorial2.qdoc | |
parent | 6abdaa41a3f40238e8a60b80b9ac55a694181e11 (diff) | |
download | Qt-cb16e0adba54015963f2cd8a3f0188965c0c9ef8.zip Qt-cb16e0adba54015963f2cd8a3f0188965c0c9ef8.tar.gz Qt-cb16e0adba54015963f2cd8a3f0188965c0c9ef8.tar.bz2 |
We use JavaScript, not ECMAScript.
Task-number: QTBUG-7720
Diffstat (limited to 'doc/src/declarative/advtutorial2.qdoc')
-rw-r--r-- | doc/src/declarative/advtutorial2.qdoc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/src/declarative/advtutorial2.qdoc b/doc/src/declarative/advtutorial2.qdoc index dcc7c70..2aa68f3 100644 --- a/doc/src/declarative/advtutorial2.qdoc +++ b/doc/src/declarative/advtutorial2.qdoc @@ -48,7 +48,7 @@ first thing to do is to generate all of the blocks. Now we need to dynamically generate all of these blocks, because you have a new, random set of blocks every time. As they are dynamically generated every time the new game button is clicked, as opposed to on startup, we will be dynamically generating the blocks -in the ECMAScript, as opposed to using a \l Repeater. +in the JavaScript, as opposed to using a \l Repeater. This adds enough script to justify a new file, \c{samegame.js}, the intial version of which is shown below @@ -62,7 +62,7 @@ The \c createBlock function is a lot bigger, and I'll explain it block by block. First we ensure that the component has been constructed. QML elements, including composite ones like the \c Block.qml that we've written, are never created directly in script. While there is a function to parse and create an arbitrary QML string, in the case where you are repeatedly creating the same item you will want to use the \c createComponent function. \c createComponent is -a built-in function in the declarative ECMAScript, and returns a component object. +a built-in function in the declarative JavaScript, and returns a component object. A component object prepares and stores a QML element (usually a composite element) for easy and efficient use. When the component is ready, you can create a new instance of the loaded QML with the \c createObject method. If the component is loaded remotely (over HTTP for example) then you will have to wait for the component to finish loading |