'From etoys2.3 of 28 November 2007 [latest update: #1865] on 25 December 2007 at 11:16:43 pm'! "Change Set: TextNumericValue-yo Date: 25 December 2007 Author: Yoshiki Ohshima numeric value of Text is smarter now. Etoys shouldn't expose Fraction values. It does a good job in most cases, but when you store a fraction to the numeric value of a text, it shows the fraction value. The setter rounds the value when stored. The decimal places property is used to decide the number of digits after the decimal point. The property is usually associated with the setter, but it is still conceptually ok, because setting the numeric value of text is getting the value and converting it to the user visible form."! !TextMorph methodsFor: 'e-toy support' stamp: 'yo 12/25/2007 23:09'! setNumericValue: aValue "Set the contents of the receiver to be a string obtained from aValue" aValue isInteger ifTrue: [ ^ self newContents: aValue asString ]. aValue isNumber ifTrue: [ ^ self newContents: (aValue asFloat roundTo: (self defaultFloatPrecisionFor: #getNumericValue)) asString. ]. ^ self newContents: '0'. ! !