text_search_widget { -required {} -bad_p 0 -post {} -size 16 } text prefix field_name n_fieldsWhat it does:
generate a text search widget with joinersDefined in: /web/philip/tcl/ticket-defs.tcl
Source code:
arg_parser_for_text_search_widget $args set frag {} if { $bad_p } { append frag "<tr><td text=red>$text$required</td><td>" } else { append frag "<tr><td>$text$required</td><td>" } set i 0 while {$i < $n_fields} { if {$n_fields < 2} { set name "$prefix${field_name}" } else { set name "$prefix${field_name}_$i" } append frag "\n<input type=text size=$size maxlength=100 name=\"$name\" [export_ns_set_value $name]>" incr i if { $i < $n_fields } { set name "$prefix${field_name}_j_[expr $i - 1]" set value [export_ns_set_value $name] set opt {<option value="and">AND</option><option value="or">OR</option><option value="and_not">AND NOT</option>} if {![empty_string_p $value]} { regsub $value $opt "SELECTED $value" opt } append frag "\n<select name=\"$name\">$opt</select>" } } append frag "$post\n</td></tr>\n"