diff options
| author | Viraj Mahesh <virajmahesh@gmail.com> | 2014-07-13 09:47:30 +0400 |
|---|---|---|
| committer | Viraj Mahesh <virajmahesh@gmail.com> | 2014-07-13 09:47:30 +0400 |
| commit | a7f0de880f691ef32553713187a1b2f3d0cf3756 (patch) | |
| tree | fd51b3fffa40e04876a7e414f3a995c6a5afb96c /store.js | |
| parent | 7daaf1252a651271f170abc0a7a0f532778aad51 (diff) | |
| parent | ec8b14a3758acfc852a6f02010394bd5814d7272 (diff) | |
| download | snap-a7f0de880f691ef32553713187a1b2f3d0cf3756.tar.gz snap-a7f0de880f691ef32553713187a1b2f3d0cf3756.zip | |
Merge branch 'master' into extensions
Conflicts:
objects.js
Diffstat (limited to 'store.js')
| -rw-r--r-- | store.js | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -61,7 +61,7 @@ SyntaxElementMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.store = '2014-February-13'; +modules.store = '2014-Jun-04'; // XML_Serializer /////////////////////////////////////////////////////// @@ -457,8 +457,6 @@ SnapSerializer.prototype.loadProjectModel = function (xmlNode) { } }); - this.objects = {}; - /* Global Variables */ if (model.globalVariables) { @@ -468,6 +466,8 @@ SnapSerializer.prototype.loadProjectModel = function (xmlNode) { ); } + this.objects = {}; + /* Watchers */ model.sprites.childrenNamed('watcher').forEach(function (model) { @@ -521,7 +521,7 @@ SnapSerializer.prototype.loadProjectModel = function (xmlNode) { )) ); project.stage.add(watcher); - watcher.update(); + watcher.onNextStep = function () {this.currentValue = null; }; // set watcher's contentsMorph's extent if it is showing a list and // its monitor dimensions are given @@ -1032,7 +1032,7 @@ SnapSerializer.prototype.loadInput = function (model, input, block) { input.setColor(this.loadColor(model.contents)); } else { val = this.loadValue(model); - if (val) { + if (!isNil(val) && input.setContents) { input.setContents(this.loadValue(model)); } } @@ -1302,6 +1302,12 @@ SnapSerializer.prototype.openProject = function (project, ide) { ide.createCorral(); ide.selectSprite(sprite); ide.fixLayout(); + + // force watchers to update + //project.stage.watchers().forEach(function (watcher) { + // watcher.onNextStep = function () {this.currentValue = null;}; + //}) + ide.world().keyboardReceiver = project.stage; }; |
