1 # IR toolkit for tcl/tk
3 # See the file LICENSE for details.
4 # Sebastian Hammer, Adam Dickmeiss
7 # Revision 1.3 1995-06-16 12:29:00 adam
8 # Use insertWithTags on diagnostic errors.
10 # Revision 1.2 1995/06/13 14:39:06 adam
11 # Fix: if {$var != ""} doesn't work if var is a large numerical!
12 # Highlight when line format is used.
14 # Revision 1.1 1995/06/12 15:18:10 adam
15 # Work on presentation formats. These are used in the main window as well
20 proc display-line {sno no w hflag} {
21 set type [z39.$sno type $no]
23 $w tag bind r$no <Any-Enter> \
24 [list $w tag configure r$no -background gray80]
25 $w tag bind r$no <Any-Leave> \
26 [list $w tag configure r$no -background {}]
32 set nostr [format "%5d " $no]
33 insertWithTags $w $nostr marc-tag
35 set title [lindex [z39.$sno getMarc $no field 245 * a] 0]
36 set year [lindex [z39.$sno getMarc $no field 260 * c] 0]
37 insertWithTags $w "$title - $year\n" marc-data
39 } elseif {$type == "SD"} {
40 set err [lindex [z39.$sno diag $no] 1]
41 set add [lindex [z39.$sno diag $no] 2]
45 insertWithTags $w "Error ${err}${add}\n" marc-data
46 } elseif {$type == ""} {