Index: openacs-4/packages/acs-tcl/tcl/widgets-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/widgets-procs.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-tcl/tcl/widgets-procs.tcl 24 Feb 2004 11:20:01 -0000 1.7 +++ openacs-4/packages/acs-tcl/tcl/widgets-procs.tcl 10 Jan 2007 21:22:12 -0000 1.8 @@ -7,7 +7,7 @@ proc_doc state_widget { {default ""} {select_name "usps_abbrev"}} "Returns a state selection box" { set widget_value "\n" - if { $default == "" } { + if { $default eq "" } { if { [ad_parameter SomeAmericanReadersP] } { append widget_value " \n" @@ -59,7 +59,7 @@ set count 0 set return_string "" foreach value $values { - if { [string compare $default $value] == 0 } { + if { $default eq $value } { append return_string "\n" } else { append return_string "\n" @@ -140,7 +140,7 @@ } set date_parts [split $value "-"] - if { $value == "" } { + if { $value eq "" } { set month "" set day "" set year "" @@ -156,7 +156,7 @@ # take care of cases like 09 for month regsub "^0" $month "" month for {set i 0} {$i < 12} {incr i} { - if { $i == [expr $month - 1] } { + if { $i == [expr {$month - 1}] } { append output "\n" } else { append output "\n" @@ -201,12 +201,12 @@ set retval {} set count 0 set dbcount 0 - if {![empty_string_p $option_list]} { + if {$option_list ne ""} { foreach opt $option_list { incr count set item [lindex $opt 1] set value [lindex $opt 0] - if { (!$multiple && [string compare $value $default] == 0) + if { (!$multiple && $value eq $default ) || ($multiple && [lsearch -exact $default $value] > -1)} { append retval "\n" } else { @@ -219,22 +219,22 @@ set count 0 } - if {! [empty_string_p $sql_qry]} { + if {$sql_qry ne ""} { set columns [ns_set create] db_foreach $statement_name $sql_qry -column_set selection -bind $bind { incr count incr dbcount set item [ns_set value $selection 0] set value [ns_set value $selection 1] - if { (!$multiple && [string compare $value $default] == 0) + if { (!$multiple && $value eq $default ) || ($multiple && [lsearch -exact $default $value] > -1)} { append retval "\n" } else { append retval "\n" } } if_no_rows { - if {![empty_string_p $default]} { + if {$default ne ""} { return "\n" } else { return {} @@ -261,7 +261,7 @@ proc_doc currency_widget {{default ""} {select_name "currency_code"} {size_subtag "size=\"4\""}} "Returns a currency selection box" { set widget_value "