From 04168220bde4cdfa82e570dcb8d098653a4fcb7a Mon Sep 17 00:00:00 2001 From: jmoenig Date: Wed, 17 Sep 2014 14:40:39 +0200 Subject: Refactor variables handling introducing Variable objects, all functionality stays the same at this time --- objects.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'objects.js') 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); } -- cgit v1.3.1