summaryrefslogtreecommitdiff
path: root/objects.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2014-09-17 14:40:39 +0200
committerjmoenig <jens@moenig.org>2014-09-17 14:40:39 +0200
commit04168220bde4cdfa82e570dcb8d098653a4fcb7a (patch)
tree99937a5105d288471eec4e51ff55eadf298dd8b7 /objects.js
parent8f7d1833f6e6b304e706bb84848dbf86a80834c8 (diff)
downloadsnap-byow-04168220bde4cdfa82e570dcb8d098653a4fcb7a.tar.gz
snap-byow-04168220bde4cdfa82e570dcb8d098653a4fcb7a.zip
Refactor variables handling
introducing Variable objects, all functionality stays the same at this time
Diffstat (limited to 'objects.js')
-rw-r--r--objects.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/objects.js b/objects.js
index fbb9e84..2ed20f2 100644
--- a/objects.js
+++ b/objects.js
@@ -125,7 +125,7 @@ PrototypeHatBlockMorph*/
// Global stuff ////////////////////////////////////////////////////////
-modules.objects = '2014-July-30';
+modules.objects = '2014-September-17';
var SpriteMorph;
var StageMorph;
@@ -6735,7 +6735,8 @@ WatcherMorph.prototype.update = function () {
if (this.target && this.getter) {
this.updateLabel();
if (this.target instanceof VariableFrame) {
- newValue = this.target.vars[this.getter];
+ newValue = this.target.vars[this.getter] ?
+ this.target.vars[this.getter].value : undefined;
} else {
newValue = this.target[this.getter]();
}
@@ -6820,7 +6821,7 @@ WatcherMorph.prototype.fixLayout = function () {
this.sliderMorph.button.pressColor.b += 100;
this.sliderMorph.setHeight(fontSize);
this.sliderMorph.action = function (num) {
- myself.target.vars[myself.getter] = Math.round(num);
+ myself.target.vars[myself.getter].value = Math.round(num);
};
this.add(this.sliderMorph);
}