--- a/ValModel.st Thu Mar 27 11:23:29 1997 +0100
+++ b/ValModel.st Thu Mar 27 15:14:10 1997 +0100
@@ -75,13 +75,19 @@
^ self subclassResponsibility
!
-value:anObject
- "set my value & send change notifications to my dependents."
+value:newValue
+ "set my value & send change notifications to my dependents
+ if it changed."
+
+ |oldValue|
- self setValue:anObject.
- self changed:#value
+ oldValue := self value.
+ oldValue ~~ newValue ifTrue:[
+ self setValue:newValue.
+ self changed:#value
+ ]
- "Modified: 21.2.1997 / 16:29:19 / cg"
+ "Modified: 27.3.1997 / 15:14:04 / cg"
! !
!ValueModel methodsFor:'converting'!
@@ -102,5 +108,5 @@
!ValueModel class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/Attic/ValModel.st,v 1.20 1997-03-05 16:10:31 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/Attic/ValModel.st,v 1.21 1997-03-27 14:14:10 cg Exp $'
! !
--- a/ValueModel.st Thu Mar 27 11:23:29 1997 +0100
+++ b/ValueModel.st Thu Mar 27 15:14:10 1997 +0100
@@ -75,13 +75,19 @@
^ self subclassResponsibility
!
-value:anObject
- "set my value & send change notifications to my dependents."
+value:newValue
+ "set my value & send change notifications to my dependents
+ if it changed."
+
+ |oldValue|
- self setValue:anObject.
- self changed:#value
+ oldValue := self value.
+ oldValue ~~ newValue ifTrue:[
+ self setValue:newValue.
+ self changed:#value
+ ]
- "Modified: 21.2.1997 / 16:29:19 / cg"
+ "Modified: 27.3.1997 / 15:14:04 / cg"
! !
!ValueModel methodsFor:'converting'!
@@ -102,5 +108,5 @@
!ValueModel class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/ValueModel.st,v 1.20 1997-03-05 16:10:31 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/ValueModel.st,v 1.21 1997-03-27 14:14:10 cg Exp $'
! !