diff options
| author | jmoenig <jens@moenig.org> | 2014-09-17 14:40:39 +0200 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2014-09-17 14:40:39 +0200 |
| commit | 04168220bde4cdfa82e570dcb8d098653a4fcb7a (patch) | |
| tree | 99937a5105d288471eec4e51ff55eadf298dd8b7 /objects.js | |
| parent | 8f7d1833f6e6b304e706bb84848dbf86a80834c8 (diff) | |
| download | snap-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.js | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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); } |
