I was only use in stupid halos and the code is not really good.Now if somebody does a pass on it we could readd it to the basis. (right now I just put it back for the sound package - but the sound package shows it ages� the code looks strange).floatPrecisionForDecimalPlaces: places"Answer the floatPrecision that corresponds to the given number of decimal places"^ places caseOf:{[0]->[1] .[1]->[0.1] .[2]->[0.01] .[3]->[0.001] .[4]->[0.0001] .[5]->[0.00001] .[6]->[0.000001] .[7]->[0.0000001] .[8]->[0.00000001] .[9]->[0.000000001]}otherwise:[(10.0 raisedTo: places negated) asFloat]
"(0 to: 6) collect: [:i | Utilities floatPrecisionForDecimalPlaces: i](-10 to: 20) collect: [:i | Utilities floatPrecisionForDecimalPlaces: i]"like decimalPlaces:valueFromContents"Return a new value from the current contents string."format = #symbol ifTrue: [^ lastValue].format = #string ifTrue: [^ contents].^ self class evaluatorClass evaluate: contentssetPrecision"Allow the user to specify a number of decimal places. This UI isinvoked from a menu. Nowadays the precision can be set by simpletype-in, making this menu approach mostly obsolete. However, it'sstill useful for read-only readouts, where type-in is not allowed."| aMenu |aMenu := UIManager defaultnewMenuIn: self for: self.aMenuaddTitle: ('How many decimal places? (currently {1})' translated format: {self decimalPlaces}).0to: 5do: [:places | aMenuadd: places asStringtarget: selfselector: #setDecimalPlaces:argument: places].aMenu popUpInWorldOn 24 oct. 2013, at 22:07, Sean P. DeNigris <sean@clipperadams.com> wrote:What happened to it and why? I'm porting TWM to 3.0 and didn't find any
mention of removal on the dev or issue mailing list... Thanks.It was removed in 30507.The decision to remove it has been made during the august sprint.I just remember that I did the job.Does someone remember why?
-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/UpdatingMenuMorph-tp4716928.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.