+proc update-attr {} {
+ set w .index-setup
+ listbuttonv $w.top.relation.b relationTmpValue\
+ {{None} 0 {Less than} 1 {Greater than or equal} 2 {Equal} 3 \
+ {Greater than or equal} 4 {Greater than} 5 {Not equal} 6 \
+ {Phonetic} 100 {Stem} 101 {Relevance} 102 {AlwaysMatches} 103}
+ listbuttonv $w.top.position.b positionTmpValue {{None} 0 \
+ {First in field} 1 {First in subfield} 2 {Any position in field} 3}
+ listbuttonv $w.top.structure.b structureTmpValue {{None} 0 {Phrase} 1 \
+ {Word} 2 {Key} 3 {Year} 4 {Date (norm)} 5 {Word list} 6 \
+ {Date (un-norm)} 100 {Name (norm)} 101 {Date (un-norm)} 102 \
+ {Structure} 103 {urx} 104 {free-form} 105 {doc-text} 106 \
+ {local-number} 107 {string} 108 {numeric string} 109}
+ listbuttonv $w.top.truncation.b truncationTmpValue {{Auto} 0 {Right} 1 \
+ {Left} 2 {Left and right} 3 {No truncation} 100 \
+ {Process #} 101 {Re-1} 102 {Re-2} 103}
+ listbuttonv $w.top.completeness.b completenessTmpValue {{None} 0 \
+ {Incomplete subfield} 1 {Complete subfield} 2 {Complete field} 3}
+}
+
+proc use-attr {init} {
+ set attr {
+ {None} 0
+ {Personal name} 1
+ {Corporate name} 2
+ {Conference name} 3
+ {Title} 4
+ {Title-series} 5
+ {Title-uniform} 6
+ {ISBN} 7
+ {ISSN} 8
+ {LC card number} 9
+ {BNB card number} 10
+ {BGF(sic) number} 11
+ {Local number} 12
+ {Dewey classification} 13
+ {UDC classification} 14
+ {Bliss classification} 15
+ {LC call number} 16
+ {NLM call number} 17
+ {NAL call number} 18
+ {MOS call number} 19
+ {Local classification} 20
+ {Subject heading} 21
+ {Subject-RAMEAU} 22
+ {BDI-index-subject} 23
+ {INSPEC-subject} 24
+ {MESH-subject} 25
+ {PA-subject} 26
+ {LC-subject-heading} 27
+ {RVM-subject-heading} 28
+ {Local subject index} 29
+ {Date} 30
+ {Date of publication} 31
+ {Date of acquisition} 32
+ {Title-key} 33
+ {Title-collective} 34
+ {Title-parallel} 35
+ {Title-cover} 36
+ {Title-added-title-page} 37
+ {Title-caption} 38
+ {Title-running} 39
+ {Title-spine} 40
+ {Title-other-variant} 41
+ {Title-former} 42
+ {Title-abbreviated} 43
+ {Title-expanded} 44
+ {Subject-PRECIS} 45
+ {Subject-RSWK} 46
+ {Subject-subdivision} 47
+ {Number-natl-bibliography} 48
+ {Number-legal-deposit} 49
+ {Number-govt-publication} 50
+ {Number-publisher-for-music} 51
+ {Number-DB} 52
+ {Number-local-call} 53
+ {Code-language} 54
+ {Code-geographic-area} 55
+ {Code-institution} 56
+ {Name and title} 57
+ {Name-geographic} 58
+ {Place-publication} 59
+ {CODEN} 60
+ {Microform-generation} 61
+ {Abstract} 62
+ {Note} 63
+ {Author-title} 1000
+ {Record type} 1001
+ {Name} 1002
+ {Author} 1003
+ {Author-name-personal} 1004
+ {Author-name-corporate} 1005
+ {Author-name-conference} 1006
+ {Identifier-standard} 1007
+ {Subject-LC-children's} 1008
+ {Subject-name-personal} 1009
+ {Body of text} 1010
+ {Date/time added to database} 1011
+ {Date/time last modified} 1012
+ {Authority/format identifier} 1013
+ {Concept-text} 1014
+ {Concept-reference} 1015
+ {Any} 1016
+ {Server choice} 1017
+ {Publisher} 1018
+ {Record source} 1019
+ {Editor} 1020
+ {Bib-level} 1021
+ {Geographic class} 1022
+ {Indexed by} 1023
+ {Map scale} 1024
+ {Music key} 1025
+ {Related periodical} 1026
+ {Report number} 1027
+ {Stock number} 1028
+ {Thematic number} 1030
+ {Material type} 1031
+ {Doc ID} 1032
+ {Host item} 1033
+ {Content type} 1034
+ {Anywhere} 1035
+ }
+ set w .index-setup
+ global useTmpValue
+ set l [llength $attr]
+
+ if {$init} {
+ set s 0
+ set lno 0
+ for {set i 0} {$i < $l} {incr i} {
+ $w.top.use.list insert end [lindex $attr $i]
+ incr i
+ if {$useTmpValue == [lindex $attr $i]} {
+ set s $lno
+ }
+ incr lno
+ }
+ $w.top.use.list select from $s
+ $w.top.use.list select to $s
+ incr s -3
+ if {$s < 0} {
+ set s 0
+ }
+ $w.top.use.list yview $s
+ } else {
+ set lno [lindex [$w.top.use.list curselection] 0]
+ set i [expr $lno+$lno+1]
+ set useTmpValue [lindex $attr $i]
+ puts "useTmpValue=$useTmpValue"
+ }
+}