ValueModel.st
changeset 62 194eb0590b1e
child 66 6ee963fd8e27
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ValueModel.st	Tue May 02 01:06:45 1995 +0200
@@ -0,0 +1,43 @@
+Model subclass:#ValueModel 
+	 instanceVariableNames:'accepted'
+	 classVariableNames:''
+	 poolDictionaries:''
+	 category:'ST80-Compatibility'
+!
+
+!ValueModel class methodsFor:'instance creation'!
+
+new
+    ^ (super new) initialize
+! !
+
+!ValueModel methodsFor:'initialization'!
+
+initialize
+    accepted := false
+! !
+
+!ValueModel methodsFor:'accessing'!
+
+accept
+    accepted := true
+!
+
+value 
+    self subclassResponsibility
+!
+
+setValue:newValue 
+    self subclassResponsibility
+!
+
+value:anObject
+    |oldValue|
+
+    oldValue := self value.
+    self setValue:anObject.
+    anObject ~= oldValue ifTrue:[
+	self changed:#value
+    ]
+! !
+