Index: openacs-4/packages/acs-templating/tcl/currency-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/currency-procs.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-templating/tcl/currency-procs.tcl 1 Nov 2003 08:45:37 -0000 1.7 +++ openacs-4/packages/acs-templating/tcl/currency-procs.tcl 26 Jan 2004 15:39:46 -0000 1.8 @@ -132,8 +132,6 @@ ad_proc -public template::util::currency::set_property { what currency_list value } { - # There's no internal error checking, just like the date version ... - # Erase leading zeroes from the value, but make sure that 00 # is not completely erased set value [template::util::leadingTrim $value] @@ -157,11 +155,22 @@ set new_value [lreplace $currency_list 1 1 $whole_part] return [lreplace $new_value 3 3 $fractional_part] } + default { + error "util::currency::property: unknown property: '$what'." + } } } ad_proc -public template::util::currency::get_property { what currency_list } { + Return a property of a currency list which was created by a + currency widget. + + @param what the name of the property (see code for allowed values) + @param currency_list a currency widget list, usually created with ad_form + + +} { # There's no internal error checking, just like the date version ... and # of course whole_part might be pounds and fractional_part pfennings ... @@ -219,6 +228,9 @@ # Glom everything into one pretty picture return "$leading_symbol$whole_part$separator$fractional_part$trailing_money" } + default { + error "util::currency::property: unknown property: '$what'." + } } }