<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 22-Nov-07, at 11:00 AM, Sebastian Sastre wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> <div style="WORD-WRAP: break-word; webkit-nbsp-mode: space; webkit-line-break: after-white-space"> <div dir="ltr" align="left"><font face="Trebuchet MS" color="#0000ff" size="2"><span class="984495318-22112007">Thanks Tim,</span></font></div> <div dir="ltr" align="left"><font face="Trebuchet MS" color="#0000ff" size="2"><span class="984495318-22112007">&nbsp;&nbsp;&nbsp; </span></font></div> <div dir="ltr" align="left"><font face="Trebuchet MS" color="#0000ff" size="2"><span class="984495318-22112007">&nbsp;&nbsp;&nbsp; may be I should clarify that it's only for presentation. The mone value is stored as anMeasure of it's monetary unit in the Aconcagua framework.</span></font></div> <div dir="ltr" align="left"><font face="Trebuchet MS" color="#0000ff" size="2"><span class="984495318-22112007"></span></font>&nbsp;</div> <div dir="ltr" align="left"><font face="Trebuchet MS" color="#0000ff" size="2"><span class="984495318-22112007">&nbsp;&nbsp;&nbsp; But I'm curious about your answer. Let's supose the user enters in&nbsp;some input widget with keyboard the '5.30'&nbsp;value. That will end as a Float at some point. Do you suggest I convert that to a ScaledDecimal? (to store/comare, etc)?</span></font></div> <div dir="ltr" align="left"><font face="Trebuchet MS" color="#0000ff" size="2"><span class="984495318-22112007"></span></font>&nbsp;</div> <div dir="ltr" align="left"><font face="Trebuchet MS" color="#0000ff" size="2"><span class="984495318-22112007">&nbsp;&nbsp;&nbsp; I'm evaluating this:</span></font></div> <div dir="ltr" align="left"><font face="Trebuchet MS" color="#0000ff" size="2"><span class="984495318-22112007"></span></font>&nbsp;</div> <div dir="ltr" align="left"><font face="Trebuchet MS" color="#0000ff" size="2"><span class="984495318-22112007">&nbsp;(5.3 asScaledDecimal: 2) <br></span></font></div> <div dir="ltr" align="left"><font face="Trebuchet MS" color="#0000ff" size="2"><span class="984495318-22112007">&nbsp;&nbsp;&nbsp; and also obtainig:&nbsp; ' 5.29s2'</span></font></div></div></blockquote><br></div><div>That must surely count as a bug and I'd hazard a guess that it happens because some code is comparing floats; I've not looked at the code but I've seen it too many times not to suspect it.</div><div><br class="webkit-block-placeholder"></div><div>As for your input widget, I'd try to make it give you the string and directly convert that to a 2dp scaled decimal rather than letting it give you a float. If there isn't a String&gt;asScaledFloat: type method then I guess you get to write it :-)</div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Palatino; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><div><br class="khtml-block-placeholder"></div><div>tim</div><div>--</div><div>tim Rowledge; tim@rowledge.org; <a href="http://www.rowledge.org/tim">http://www.rowledge.org/tim</a></div><div>All the simple programs have been written, and all the good names taken.</div></div><br class="Apple-interchange-newline"></span> </div><br></body></html>