ValueModel.st
author claus
Wed, 03 May 1995 20:15:57 +0200
changeset 67 e48bf03eb059
parent 66 6ee963fd8e27
child 68 43b867285d01
permissions -rw-r--r--
Initial revision

Model subclass:#ValueModel 
	 instanceVariableNames:'accepted'
	 classVariableNames:''
	 poolDictionaries:''
	 category:'Interface-Support'
!

!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
    ]
! !