Index: openacs-4/packages/acs-core-docs/www/xml/developers-guide/programming-with-aolserver.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/developers-guide/programming-with-aolserver.xml,v diff -u -r1.12 -r1.13 --- openacs-4/packages/acs-core-docs/www/xml/developers-guide/programming-with-aolserver.xml 11 Sep 2024 06:15:47 -0000 1.12 +++ openacs-4/packages/acs-core-docs/www/xml/developers-guide/programming-with-aolserver.xml 13 Nov 2024 08:34:01 -0000 1.13 @@ -283,9 +283,8 @@ # ns_set variant -set size [ns_set size $myset] -for { set i 0 } { $i < $size } { incr i } { - puts "[ns_set key $myset $i] = [ns_set value $myset $i]" +foreach {name value} [ns_set array $myset] { + puts "$key = $value" } # array variant Index: openacs-4/packages/acs-core-docs/www/xml/kernel/db-api.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/kernel/db-api.xml,v diff -u -r1.15 -r1.16 --- openacs-4/packages/acs-core-docs/www/xml/kernel/db-api.xml 11 Sep 2024 06:15:47 -0000 1.15 +++ openacs-4/packages/acs-core-docs/www/xml/kernel/db-api.xml 13 Nov 2024 08:34:01 -0000 1.16 @@ -566,8 +566,8 @@ db_foreach users_select "select first_names, last_name from users" -column_set columns { # Now $columns is an ns_set. doc_body_append "<li>" - for { set i 0 } { $i < [ns_set size $columns] } { incr i } { - doc_body_append "[ns_set key $columns $i] is [ns_set value $columns $i]. \n" + foreach {key value} [ns_set array $columns] { + doc_body_append "$key is $value. \n" } }