Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 9 Feb 2002 02:33:35 -0000 1.5 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 22 Feb 2002 19:02:07 -0000 1.6 @@ -2852,3 +2852,22 @@ set today [lindex [split [ns_localsqltimestamp] " "] 0] return [ad_dateentrywidget $column $today] } + +ad_proc -public util_ns_set_to_list { + {-set:required} +} { + Convert an ns_set into a TCL array. + + @param set The ns_set to convert + + @return An array of equivalent keys and values as the ns_set specified. +} { + set result [list] + + for {set i 0} {$i < [ns_set size $set]} {incr i} { + lappend result [ns_set key $set $i] + lappend result [ns_set value $set $i] + } + + return $result +}