From fdd934b4110ff7c9c5602153384eea9601bf6f7c Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Mon, 26 Oct 2009 17:47:10 +1000 Subject: make remotable --- demos/declarative/samegame/content/qmldir | 3 +++ demos/declarative/samegame/content/samegame.js | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 demos/declarative/samegame/content/qmldir diff --git a/demos/declarative/samegame/content/qmldir b/demos/declarative/samegame/content/qmldir new file mode 100644 index 0000000..a8f8a98 --- /dev/null +++ b/demos/declarative/samegame/content/qmldir @@ -0,0 +1,3 @@ +BoomBlock 0.0 BoomBlock.qml +Button 0.0 Button.qml +Dialog 0.0 Dialog.qml diff --git a/demos/declarative/samegame/content/samegame.js b/demos/declarative/samegame/content/samegame.js index 15bafc4..1b81f87 100755 --- a/demos/declarative/samegame/content/samegame.js +++ b/demos/declarative/samegame/content/samegame.js @@ -7,7 +7,7 @@ var board = new Array(maxIndex); var tileSrc = "content/BoomBlock.qml"; var scoresURL = "http://qtfx-nokia.trolltech.com.au/samegame/scores.php"; var timer; -var component; +var component = createComponent(tileSrc); //Index function used instead of a 2D array function index(xIdx,yIdx) { @@ -179,9 +179,6 @@ function floodMoveCheck(xIdx, yIdx, type) } function createBlock(xIdx,yIdx){ - if(component==null) - component = createComponent(tileSrc); - // Note that we don't wait for the component to become ready. This will // only work if the block QML is a local file. Otherwise the component will // not be ready immediately. There is a statusChanged signal on the -- cgit v0.12