From: Adam Dickmeiss Date: Fri, 16 Jun 1995 14:41:05 +0000 (+0000) Subject: Scan line entries can be copied to a search entry. X-Git-Tag: IRTCL.1.4~269 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=70d2b7d6a87c5ee802defcb789784deffa1f5e75;p=ir-tcl-moved-to-github.git Scan line entries can be copied to a search entry. --- diff --git a/client.tcl b/client.tcl index a207c34..42c94c8 100644 --- a/client.tcl +++ b/client.tcl @@ -4,7 +4,10 @@ # Sebastian Hammer, Adam Dickmeiss # # $Log: client.tcl,v $ -# Revision 1.42 1995-06-16 12:28:13 adam +# Revision 1.43 1995-06-16 14:41:05 adam +# Scan line entries can be copied to a search entry. +# +# Revision 1.42 1995/06/16 12:28:13 adam # Implemented preferredRecordSyntax. # Minor changes in diagnostic handling. # Record list deleted when connection closes. @@ -848,6 +851,14 @@ proc search-request {} { show-status {Searching} 1 0 } +proc scan-copy {y entry} { + set w .scan-window + set no [$w.top.list nearest $y] + puts "no=$no" + .lines.$entry.e delete 0 end + .lines.$entry.e insert 0 [string range [$w.top.list get $no] 8 end] +} + proc scan-request {} { set w .scan-window @@ -899,6 +910,7 @@ proc scan-request {} { bind $w.top.list [list scan-up $attr] bind $w.top.list [list scan-down $attr] } + bind $w.top.list [list scan-copy %y $curIndexEntry] wm title $w "Scan $title" z39 callback [list scan-response $attr 0 35] @@ -2396,7 +2408,26 @@ proc index-query {} { if {$term != ""} { set attr [lrange [lindex $queryInfoFind [lindex $b 1]] 1 end] + set len [string length $term] + incr len -1 + set left 0 + set right 0 + if {[string index $term $len] == "?"} { + set right 1 + set term [string range $term 0 [expr $len - 1]] + } + if {[string index $term 0] == "?"} { + set left 1 + set term [string range $term 1 end] + } set term "\{${term}\}" + if {$right && $left} { + set term "@attr 5=3 ${term}" + } elseif {$right} { + set term "@attr 5=1 ${term}" + } elseif {$left} { + set term "@attr 5=2 ${term}" + } foreach a $attr { set term "@attr $a ${term}" } diff --git a/clientrc.tcl b/clientrc.tcl index bf7570a..290b640 100644 --- a/clientrc.tcl +++ b/clientrc.tcl @@ -18,6 +18,6 @@ set {profile(CLSI)} {CLSI inet-gw.clsi.uc.geac.com 210 {} 16384 8192 tcpip Cl 1 set {profile(Innovative)} {{Innovatives server: demo.iii.com} demo.iii.com 210 {} 16384 8192 tcpip DEFAULT 1 {} {} z39v2 12} set {profile(AULS)} {{Acadia university} auls.acadiau.ca 210 {} 16384 8192 tcpip AULS 1 {} {} z39v2 14} set {profile(dranet)} {dranet dranet.dra.com 210 {} 16384 16384 tcpip drewdb 1 {} {} z39v2 15} -set queryTypes {Simple aaaaaaa} -set queryButtons {{ {I 0} {I 1} {I 2} } {{I 0} {I 1}}} -set queryInfo {{ {Title {1=4}} {Author {1=1}} {Subject {1=21}} {Any {1=1016}}} {{Title 1=4} {Year 1=30} {xxx 1=1034}}} +set queryTypes {Simple aaaaaaa phrase} +set queryButtons {{ {I 0} {I 1} {I 2} } {{I 0} {I 1}} {{I 0} {I 1} {I 0}}} +set queryInfo {{ {Title {1=4}} {Author {1=1}} {Subject {1=21}} {Any {1=1016}}} {{Title 1=4} {Year 1=30} {xxx 1=1034}} {{Title 1=4 4=1 6=2} {Author 1=1003 4=1 6=2} {ISBN 1=7} {ISSN 1=8} {Year 1=30 4=4 6=2} {Any {}}}}