1 # IR toolkit for tcl/tk
3 # See the file LICENSE for details.
4 # Sebastian Hammer, Adam Dickmeiss
7 # Revision 1.6 1995-06-29 12:34:20 adam
8 # IrTcl now works with both tk4.0b4/tcl7.4b4 and tk3.6/tcl7.3
10 # Revision 1.5 1995/06/22 13:16:28 adam
11 # Feature: SUTRS. Setting getSutrs implemented.
12 # Work on display formats.
14 # Revision 1.4 1995/06/19 08:10:21 adam
15 # Inverse highligt colours in monochrome mode.
17 # Revision 1.3 1995/06/16 12:29:00 adam
18 # Use insertWithTags on diagnostic errors.
20 # Revision 1.2 1995/06/13 14:39:06 adam
21 # Fix: if {$var != ""} doesn't work if var is a large numerical!
22 # Highlight when line format is used.
24 # Revision 1.1 1995/06/12 15:18:10 adam
25 # Work on presentation formats. These are used in the main window as well
30 proc display-line {sno no w hflag} {
32 set type [z39.$sno type $no]
35 $w tag bind r$no <Any-Enter> \
36 [list $w tag configure r$no -background gray80]
37 $w tag bind r$no <Any-Leave> \
38 [list $w tag configure r$no -background {}]
40 $w tag bind r$no <Any-Enter> \
41 [list $w tag configure r$no -background black -foreground white]
42 $w tag bind r$no <Any-Leave> \
43 [list $w tag configure r$no -background {} -foreground {}]
49 set nostr [format "%5d " $no]
50 insertWithTags $w $nostr marc-tag
53 set rtype [z39.$sno recordType $no]
54 if {$rtype == "SUTRS"} {
55 insertWithTags $w [join [z39.$sno getSutrs $no]]
58 set title [lindex [z39.$sno getMarc $no field 245 * a] 0]
59 set year [lindex [z39.$sno getMarc $no field 260 * c] 0]
60 insertWithTags $w "$title - $year\n" marc-data
62 insertWithTags $w "Unknown record type: $rtype\n" marc-id
65 } elseif {$type == "SD"} {
66 set err [lindex [z39.$sno diag $no] 1]
67 set add [lindex [z39.$sno diag $no] 2]
71 insertWithTags $w "Error ${err}${add}\n" marc-id