AspectAdaptor.st
changeset 381 b8126729b7a4
parent 379 62b71a8294a3
child 409 391a714f95e4
--- a/AspectAdaptor.st	Wed Jan 22 18:17:33 1997 +0100
+++ b/AspectAdaptor.st	Wed Jan 22 18:30:09 1997 +0100
@@ -166,43 +166,60 @@
 
 accessWith:getSelector assignWith:putSelector
     "setup the recevier to use getSelector to fetch a value
-     and setSelector to change it."
+     and putSelector to change it."
 
     getMsg := getSelector.
     putMsg := putSelector
+
+    "Modified: 22.1.1997 / 18:28:46 / cg"
 !
 
 accessWith:getSelector assignWith:putSelector aspect:aspectSymbol
     "setup the recevier to use getSelector to fetch a value
-     and setSelector to change it."
+     and putSelector to change it."
 
     getMsg := getSelector.
     putMsg := putSelector.
     myAspect := aspectSymbol
+
+    "Modified: 22.1.1997 / 18:28:51 / cg"
 !
 
 forAspect
+    "get the adapters aspect - if none was defined, the getMsg is returned"
+
     myAspect isNil ifTrue:[
-	^ getMsg
+        ^ getMsg
     ].
     ^ myAspect
+
+    "Modified: 22.1.1997 / 18:27:24 / cg"
 !
 
 forAspect:aSelector
+    "set the adapters aspect - this sets both the get- and put-Messages
+     (the putMessage is the aspect with a colon)"
+
     getMsg := myAspect := aSelector.
     putMsg := (aSelector , ':') asSymbol.
+
+    "Modified: 22.1.1997 / 18:29:05 / cg"
 ! !
 
 !AspectAdaptor methodsFor:'accessing-value'!
 
 setValue:newValue
+    "set the value - this forwards a putMessage to the target"
+
     |target oldValue|
 
     target := super value.
     oldValue := target perform:getMsg.
     oldValue ~~ newValue ifTrue:[
-	target perform:putMsg with:newValue.
+        target perform:putMsg with:newValue.
     ]
+
+    "Modified: 22.1.1997 / 18:28:40 / cg"
 !
 
 value
@@ -216,16 +233,21 @@
 !
 
 value:newValue
+    "set the value - this forwards a putMessage to the target
+     and sends out a changeNotification if the value did really change."
+
     |target oldValue|
 
     target := super value.
     oldValue := target perform:getMsg.
     oldValue ~~ newValue ifTrue:[
-	target perform:putMsg with:newValue.
-	subjectSendsUpdates ifFalse:[
-	    self changed:#value
-	]
+        target perform:putMsg with:newValue.
+        subjectSendsUpdates ifFalse:[
+            self changed:#value
+        ]
     ]
+
+    "Modified: 22.1.1997 / 18:29:59 / cg"
 ! !
 
 !AspectAdaptor methodsFor:'change & update'!
@@ -246,5 +268,5 @@
 !AspectAdaptor class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/AspectAdaptor.st,v 1.15 1997-01-22 11:01:42 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/AspectAdaptor.st,v 1.16 1997-01-22 17:30:09 cg Exp $'
 ! !