--- a/ProtocolAdaptor.st Sun Nov 02 18:32:36 1997 +0100
+++ b/ProtocolAdaptor.st Sun Nov 02 18:50:19 1997 +0100
@@ -208,6 +208,24 @@
^ self valueUsingSubject:obj
!
+value:newValue
+ "set my value & send change notifications to my dependents
+ if it changed. But only if my subject does not itself
+ send change notifications (otherwise, we'd send double notifications)."
+
+ |oldValue|
+
+ oldValue := self value.
+ oldValue ~~ newValue ifTrue:[
+ self setValue:newValue.
+ subjectSendsUpdates ifFalse:[
+ self changed:#value
+ ]
+ ]
+
+ "Created: / 1.11.1997 / 14:04:45 / cg"
+!
+
valueUsingSubject:anObject
"return the value from anObject, using the selectors in accessPath.
A helper for value."
@@ -324,7 +342,7 @@
].
! !
-!ProtocolAdaptor methodsFor:'change notification'!
+!ProtocolAdaptor ignoredMethodsFor:'change notification'!
changed:aspect
"redefined to suppress change notifications, if my subject already did it"
@@ -350,5 +368,5 @@
!ProtocolAdaptor class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/ProtocolAdaptor.st,v 1.12 1996-04-27 17:58:56 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/ProtocolAdaptor.st,v 1.13 1997-11-02 17:50:19 cg Exp $'
! !