diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2010-04-19 11:42:49 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2010-04-21 07:13:51 (GMT) |
commit | 202af3021362d3c8066bc479a95e7aad889bd928 (patch) | |
tree | 03587443c77403321c18e384b3277abd576e9ba3 /demos/declarative | |
parent | 2ac290f56c6ad4f3e236034a7b99ecdb598ecc3a (diff) | |
download | Qt-202af3021362d3c8066bc479a95e7aad889bd928.zip Qt-202af3021362d3c8066bc479a95e7aad889bd928.tar.gz Qt-202af3021362d3c8066bc479a95e7aad889bd928.tar.bz2 |
Make the dynamic creation functions on the Qt object
Also updated examples to still work, and the dynamic example now uses
exceptions a little, to demonstrate that it can be done. Exceptions are
also now filled out with the QML error data.
Task-number: QT-2801
Reviewed-by: Aaron Kennedy
Diffstat (limited to 'demos/declarative')
-rwxr-xr-x | demos/declarative/samegame/SamegameCore/samegame.js | 2 | ||||
-rw-r--r-- | demos/declarative/snake/content/snake.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/demos/declarative/samegame/SamegameCore/samegame.js b/demos/declarative/samegame/SamegameCore/samegame.js index 3888381..aafbfdf 100755 --- a/demos/declarative/samegame/SamegameCore/samegame.js +++ b/demos/declarative/samegame/SamegameCore/samegame.js @@ -8,7 +8,7 @@ var blockSrc = "SamegameCore/BoomBlock.qml"; var scoresURL = "http://qtfx-nokia.trolltech.com.au/samegame/scores.php"; var scoresURL = ""; var gameDuration; -var component = createComponent(blockSrc); +var component = Qt.createComponent(blockSrc); //Index function used instead of a 2D array function index(column,row) { diff --git a/demos/declarative/snake/content/snake.js b/demos/declarative/snake/content/snake.js index 12176c7..2457fbd 100644 --- a/demos/declarative/snake/content/snake.js +++ b/demos/declarative/snake/content/snake.js @@ -5,8 +5,8 @@ var links = new Array; var scheduledDirections = new Array; var numRows = 1; var numColumns = 1; -var linkComponent = createComponent("content/Link.qml"); // XXX should resolve relative to script, not component -var cookieComponent = createComponent("content/Cookie.qml"); +var linkComponent = Qt.createComponent("content/Link.qml"); // XXX should resolve relative to script, not component +var cookieComponent = Qt.createComponent("content/Cookie.qml"); var cookie; var linksToGrow = 0; var linksToDie = 0; |