diff -r 6f00394c5a4a -r fa5b5e4336bf ValueHolder.st --- a/ValueHolder.st Thu Nov 23 11:40:23 1995 +0100 +++ b/ValueHolder.st Thu Nov 23 11:43:41 1995 +0100 @@ -10,7 +10,7 @@ hereby transferred. " -ValueModel subclass:#ValueHolder +ValueModel subclass:#ValueHolder instanceVariableNames:'value' classVariableNames:'' poolDictionaries:'' @@ -33,10 +33,6 @@ " ! -version - ^ '$Header: /cvs/stx/stx/libview2/ValueHolder.st,v 1.9 1995-11-11 16:05:27 cg Exp $' -! - documentation " a valueHolder can be used as a model for editFields, buttons etc. @@ -73,14 +69,31 @@ Transcript show:firstName value; show:' '; showCr:lastName value ] " +! + +version + ^ '$Header: /cvs/stx/stx/libview2/ValueHolder.st,v 1.10 1995-11-23 10:43:07 cg Exp $' ! ! !ValueHolder class methodsFor:'instance creation'! -with:anObject - "return a new ValueHolder holding anObject as initial value" +newBoolean + "return a new ValueHolder holding false as initial value" + + ^ self with:false +! - ^ (super new) setValue:anObject +newFraction + "return a new ValueHolder holding 0.0 as initial value. + The name is somewhat missleading - actually it should be called newFloat." + + ^ self with:0.0 +! + +newNumber + "return a new ValueHolder holding 0 as initial value" + + ^ self with:0 ! newString @@ -89,23 +102,10 @@ ^ self with:'' ! -newBoolean - "return a new ValueHolder holding false as initial value" - - ^ self with:false -! - -newNumber - "return a new ValueHolder holding 0 as initial value" +with:anObject + "return a new ValueHolder holding anObject as initial value" - ^ self with:0 -! - -newFraction - "return a new ValueHolder holding 0.0 as initial value. - The name is somewhat missleading - actually it should be called newFloat." - - ^ self with:0.0 + ^ (super new) setValue:anObject ! ! !ValueHolder methodsFor:'accessing'! @@ -121,3 +121,4 @@ ^ value ! ! +