Index: openacs-4/packages/acs-tcl/tcl/openacs-kernel-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/openacs-kernel-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-tcl/tcl/openacs-kernel-procs.tcl 12 Mar 2002 05:04:32 -0000 1.1 +++ openacs-4/packages/acs-tcl/tcl/openacs-kernel-procs.tcl 25 Mar 2002 05:28:09 -0000 1.2 @@ -127,4 +127,14 @@ } } } + + ad_proc -public vars_to_ns_set { + {-ns_set:required} + {-var_list:required} + } { + foreach var $var_list { + upvar $var one_var + ns_set put $ns_set $var $one_var + } + } } 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.6 -r1.7 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 22 Feb 2002 19:02:07 -0000 1.6 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 25 Mar 2002 05:28:09 -0000 1.7 @@ -2871,3 +2871,19 @@ return $result } + + +ad_proc -public util_list_to_ns_set { aList } { + Convert an ns_set into a TCL array. + + @param set The list to convert + + @return The id of a (non-persistent) ns_set +} { + set setid [ns_set create] + foreach {k v} $aList { + ns_set put $setid $k $v + } + + return $setid +}