[Seaside] Money ScaledDecimal is it really *appropriate* ?
Dmitry Dorofeev
dima-sender-3c337a at yasp.com
Fri Feb 3 14:55:45 CET 2006
Avi Bryant wrote:
>
> On Feb 3, 2006, at 1:25 AM, Dmitry Dorofeev wrote:
>
>> 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' -> '€'
>
>
> The latter, I think.
>
> We should probably have a Currency object, in fact, to encapsulate some
> of that logic. Not sure whether to have a subclass per currency or
> something simpler...
>
> Avi
Ok, here is the situation: I need currency support in Seaside or Squeak.
But I am new to Smalltalk and have no idea what may be 'something simpler'.
Could you please tell me some directions like 'subclass ABC and implement
methods to convert USD to $ sign preferably named convertCode:'.
If that gonna be part of Seaside, fine.
If it is easy I will do my best to follow your directions and send back my code.
(my first contribution!) BTW I am ready to consult standards bodies to fetch
all currency symbols in UTF8 encoding! And all matched 3 letters currency codes.
So probably it will be one class handling all associations for the planet ?
Thanks.
-Dmitry
More information about the Seaside
mailing list