Index: openacs-4/packages/acs-templating/tcl/richtext-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/richtext-procs.tcl,v diff -u -r1.12 -r1.12.2.1 --- openacs-4/packages/acs-templating/tcl/richtext-procs.tcl 15 Oct 2003 12:35:51 -0000 1.12 +++ openacs-4/packages/acs-templating/tcl/richtext-procs.tcl 24 Dec 2003 01:29:33 -0000 1.12.2.1 @@ -95,9 +95,20 @@ } ad_proc -public template::util::richtext::set_property { what richtext_list value } { + + Replace a property in a list created by a richtext widget. - # There's no internal error checking, just like the date version ... + @param what one of: + @param richtext_list the richtext list to modify + @param value the new value + @return the modified list + +} { + set contents [lindex $richtext_list 0] set format [lindex $richtext_list 1] @@ -110,12 +121,24 @@ # Replace format with value return [list $contents $value] } + default { + error "Parameter supplied to util::richtext::set_property 'what' must be one of: 'contents', 'format'. You specified: '$what'." + } } } ad_proc -public template::util::richtext::get_property { what richtext_list } { + + Returns a property of a list created by a richtext widget. + + @param what the name of the property. Must be one of: + @param richtext_list the name of a richtext widget list, usually created with ad_form + - # There's no internal error checking, just like the date version ... +} { set contents [lindex $richtext_list 0] set format [lindex $richtext_list 1] @@ -134,6 +157,9 @@ return {} } } + default { + error "Parameter supplied to util::richtext::get_property 'what' must be one of: 'contents', 'format', 'html_value'. You specified: '$what'." + } } }