[Seaside] Money ScaledDecimal is it really *appropriate* ?

Dmitry Dorofeev dima-sender-3c337a at yasp.com
Fri Feb 3 10:25:48 CET 2006

Thanks Avi,

I just wondering can I use 
Money amount: 15.89 currency: '£'

to use with HTML rendering (same applies to Euro sign)

or do we need just different method to rendering HTML friendly
version of currency symbols based on name of currency ?
like Dictionary with
'USD' -> $
'GBP' -> '£'
'EUR' -> '€'


Avi Bryant wrote:
> On Feb 2, 2006, at 9:29 AM, David Shaffer wrote:
>> I'd like to second what I believe Colin said about using integers to
>> represent money.  If you need four digits then that dictates the scale
>> of your integers.  Maybe ScaledDecimals would do the job, don't know
>> anything about them, but my experience dictates that it only takes 10
>> minutes to put together a Money (and/or Currency) class based on this
>> integer representation and it is well worth the effort.  Attached  is one
>> that I've used in the past...maybe not as robust as you need but you
>> could probably hack it into your 4-digit form faster than you could
>> learn about ScaledDecimal...
>> Maybe somewants to post a more industry hardened version :-)
> I wouldn't call it industry hardened, but I've posted what we use in  
> Dabble to http://squeaksource.com/Money .  It uses the MoneyBag  
> approach to dealing with currency that I remember seeing as a pattern  
> somewhere...
> Avi
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

More information about the Seaside mailing list