# Sebastian Hammer, Adam Dickmeiss
#
# $Log: client.tcl,v $
-# Revision 1.104 1998-02-12 13:32:41 adam
+# Revision 1.105 1998-06-10 13:00:45 adam
+# Added ir-version command.
+#
+# Revision 1.104 1998/02/12 13:32:41 adam
# Updated configuration system.
#
# Revision 1.103 1998/01/30 13:30:50 adam
#
#
+
# Procedure tk4 is defined - returns 0 if tk 3.6 - returns 1 otherwise
if {$tk_version == "3.6"} {
proc tk4 {} {
}
+# Procedure place-force {window parent}
+# window new top level widget
+# parent parent widget used as base
+# Sets geometry of $window relative to $parent window.
+proc place-force {window parent} {
+ set g [wm geometry $parent]
+
+ set p1 [string first + $g]
+ set p2 [string last + $g]
+
+ set x [expr 40+[string range $g [expr $p1 +1] [expr $p2 -1]]]
+ set y [expr 60+[string range $g [expr $p2 +1] end]]
+ wm geometry $window +${x}+${y}
+}
+
# Procedure destroyGW {w}
# w top level widget
# Saves geometry of widget w in windowGeometry array. This
pack $w.bot -fill both
}
+# Init: The geometry information for the main window is set - either
+# to a default value or to the value in windowGeometry(.)
+if {[catch {set g $windowGeometry(.)}]} {
+ wm geometry . 420x340+20+20
+} else {
+ wm geometry . $g
+}
+
+# Init: The geometry information for the main window is set - either
+# to a default value or to the value in windowGeometry(.)
+toplevelG .init
+place-force .init .
+message .init.top -text "IrTcl" -relief raised -border 1 -font $font(bb,normal)
+text .init.msg -width 30 -height 4
+pack .init.top -side top -fill x -expand yes
+pack .init.msg -side bottom -fill both -expand yes
+wm iconify .
+update
+
# Procedure top-down-ok-cancel {w ok-action g}
# w top level widget with $w.bot-frame
# ok-action ok script
label $w.top.a.logo -bitmap @${libdir}/bitmaps/book1
pack $w.top.a.irtcl $w.top.a.logo -side left -expand yes
- set i unknown
- catch {set i [z39 implementationName]}
- label $w.top.p.in -text "Implementation name: $i"
- catch {set i [z39 implementationId]}
- label $w.top.p.ii -text "Implementation id: $i"
- catch {set i [z39 implementationVersion]}
- label $w.top.p.iv -text "Implementation version: $i"
- set i $tk_version
- label $w.top.p.tk -text "Tk version: $i"
+ label $w.top.p.irtcl -text "IrTcl version: [lindex [ir-version] 0]"
+ label $w.top.p.yaz -text "Yaz version: [lindex [ir-version] 1]"
- pack $w.top.p.in $w.top.p.ii $w.top.p.iv $w.top.p.tk -side top -anchor nw
+ label $w.top.p.tk -text "Tk version: $tk_version"
+
+ pack $w.top.p.irtcl $w.top.p.yaz $w.top.p.tk -side top -anchor nw
about-origin-logo 1
bottom-buttons $w [list {Close} [list destroy $w] \
destroy $w
}
-# Procedure place-force {window parent}
-# window new top level widget
-# parent parent widget used as base
-# Sets geometry of $window relative to $parent window.
-proc place-force {window parent} {
- set g [wm geometry $parent]
-
- set p1 [string first + $g]
- set p2 [string last + $g]
-
- set x [expr 40+[string range $g [expr $p1 +1] [expr $p2 -1]]]
- set y [expr 60+[string range $g [expr $p2 +1] end]]
- wm geometry $window +${x}+${y}
-}
-
# Procedure add-database-action {target w}
# target target to be defined
# w top level widget for the target definition
$w.0 configure -background red
}
-# Init: The geometry information for the main window is set - either
-# to a default value or to the value in windowGeometry(.)
-if {[catch {set g $windowGeometry(.)}]} {
- wm geometry . 420x340
-} else {
- wm geometry . $g
-}
-
# Init: Presentation formats are read.
read-formats
# Init: Determine if the IrTcl extension is already there. If
# not, then dynamically load the IrTcl extension.
-if {[catch {ir z39}]} {
+set logLevel all
+if {[catch {ir-version}]} {
set e [info sharedlibextension]
- puts -nonewline "Loading irtcl$e ..."
+ .init.msg insert end "Loading irtcl$e.\n"
load ${libdir}/irtcl$e irtcl
- ir z39
- puts "ok"
+ if {[catch {ir-version}]} {
+ load irtcl$e irtcl
+ }
}
+.init.msg insert end "IrTcl version [lindex [ir-version] 0]\n"
+.init.msg insert end "YAZ version [lindex [ir-version] 1]\n"
+ir-log-init all irtcl.log
+
+# Create Z Assocation
+ir z39
+
if {[file exists ${libdir}/explain.tcl]} {
source ${libdir}/explain.tcl
}
source ${libdir}/setup.tcl
}
-# Init: Uncomment this line if you wan't to enable logging.
-ir-log-init all irtcl irtcl.log
+after 900 activateMainWindow
-# Init: If hostid is a valid target, a new connection will be established
-# immediately.
-if {[string compare $hostid Default]} {
- catch {open-target $hostid $hostbase}
+proc activateMainWindow {} {
+ global hostid hostbase
+ destroy .init
+ wm deiconify .
+ if {[string compare $hostid Default]} {
+ catch {open-target $hostid $hostbase}
+ }
+ show-logo 1
}
-
-# Init: Enable the logo.
-show-logo 1
-
set {profile(Bell Laboratories Library Network,timeLastExplain)} 891519770
set {profile(Bell Laboratories Library Network,timeLastInit)} 891519770
set {profile(Bell Laboratories Library Network,welcomeMessage)} {Salutations - this is Lucent Technologies experimental Z39.50 server. No guarentees, but free and unlimited access!}
-set {profile(Bell Laboratories Library Network,windowNumber)} 16
+set {profile(Bell Laboratories Library Network,windowNumber)} 17
set {profile(Bibliothèque Nationale du Québec,authentication)} {}
set {profile(Bibliothèque Nationale du Québec,comstack)} tcpip
set {profile(Bibliothèque Nationale du Québec,databases)} IRIS
set {profile(Bibliothèque Nationale du Québec,timeLastExplain)} {}
set {profile(Bibliothèque Nationale du Québec,timeLastInit)} 887288466
set {profile(Bibliothèque Nationale du Québec,welcomeMessage)} {}
-set {profile(Bibliothèque Nationale du Québec,windowNumber)} 7
+set {profile(Bibliothèque Nationale du Québec,windowNumber)} 8
set {profile(British Library,authentication)} {}
set {profile(British Library,comstack)} tcpip
set {profile(British Library,databases)} {EXPLAIN MAR SRI}
set profile(DanBib,timeLastExplain) 893854494
set profile(DanBib,timeLastInit) 893854061
set profile(DanBib,welcomeMessage) {}
-set profile(DanBib,windowNumber) 4
+set profile(DanBib,windowNumber) 5
set profile(Default,authentication) {}
set profile(Default,comstack) tcpip
set profile(Default,description) {}
set profile(Default,timeLastExplain) {}
set profile(Default,timeLastInit) {}
set profile(Default,welcomeMessage) {}
-set profile(Default,windowNumber) 20
+set profile(Default,windowNumber) 21
set profile(LOC,authentication) {}
set profile(LOC,comstack) tcpip
set profile(LOC,databases) {BOOKS NAMES AUTH MAPS MUSIC BIB SERIALS SUBJECTS}
set profile(LOC,timeLastExplain) {}
set profile(LOC,timeLastInit) 891519824
set profile(LOC,welcomeMessage) {}
-set profile(LOC,windowNumber) 11
+set profile(LOC,windowNumber) 12
set {profile(OCLC FirstSearch,authentication)} {}
set {profile(OCLC FirstSearch,comstack)} tcpip
set {profile(OCLC FirstSearch,databases)} {AGRICOLA MEDLINE}
set {profile(OCLC FirstSearch,timeLastExplain)} {}
set {profile(OCLC FirstSearch,timeLastInit)} 886167890
set {profile(OCLC FirstSearch,welcomeMessage)} {}
-set {profile(OCLC FirstSearch,windowNumber)} 15
+set {profile(OCLC FirstSearch,windowNumber)} 16
set profile(Penn,authentication) {}
set profile(Penn,comstack) tcpip
set profile(Penn,databases) CATALOG
set profile(Penn,timeLastExplain) {}
set profile(Penn,timeLastInit) 887289434
set profile(Penn,welcomeMessage) {}
-set profile(Penn,windowNumber) 19
+set profile(Penn,windowNumber) 20
set profile(Stein,authentication) {}
set profile(Stein,comstack) tcpip
set profile(Stein,databases) {lbopac miopac}
set profile(Stein,targetInfoName) {LB Z39.50-server}
set profile(Stein,timeDefine) {}
set profile(Stein,timeLastExplain) 893857722
-set profile(Stein,timeLastInit) 893857722
+set profile(Stein,timeLastInit) 897482265
set profile(Stein,welcomeMessage) {Welcome to the Z39.50 target of Steiermaerkische Landesbibliothek, Graz, Austria.}
-set profile(Stein,windowNumber) 12
+set profile(Stein,windowNumber) 13
set profile(arcatarget,authentication) {}
set profile(arcatarget,comstack) tcpip
set profile(arcatarget,databases) {IEI-books IR-Explain-1}
set profile(arcatarget,timeLastExplain) 887289477
set profile(arcatarget,timeLastInit) 887289477
set profile(arcatarget,welcomeMessage) {buon lavoro}
-set profile(arcatarget,windowNumber) 8
+set profile(arcatarget,windowNumber) 9
set profile(author,authentication) {}
set profile(author,comstack) tcpip
set profile(author,databases) {spain portugal france england belgium}
set profile(author,timeLastExplain) {}
set profile(author,timeLastInit) 891519833
set profile(author,welcomeMessage) {}
-set profile(author,windowNumber) 18
+set profile(author,windowNumber) 19
+set profile(bagel.indexdata.dk,authentication) {}
+set profile(bagel.indexdata.dk,comstack) tcpip
+set profile(bagel.indexdata.dk,databases) {dranet.dra.com IR-Explain-1 gils marc}
+set profile(bagel.indexdata.dk,description) {}
+set profile(bagel.indexdata.dk,host) bagel.indexdata.dk
+set profile(bagel.indexdata.dk,idAuthentication) {}
+set profile(bagel.indexdata.dk,largeSetLowerBound) 2
+set profile(bagel.indexdata.dk,maxResultSets) {}
+set profile(bagel.indexdata.dk,maxResultSize) {}
+set profile(bagel.indexdata.dk,maxTerms) {}
+set profile(bagel.indexdata.dk,maximumRecordSize) 50000
+set profile(bagel.indexdata.dk,mediumSetPresentNumber) 0
+set profile(bagel.indexdata.dk,multipleDatabases) 1
+set profile(bagel.indexdata.dk,namedResultSets) 1
+set profile(bagel.indexdata.dk,port) 210
+set profile(bagel.indexdata.dk,preferredMessageSize) 30000
+set profile(bagel.indexdata.dk,presentChunk) 4
+set profile(bagel.indexdata.dk,protocol) Z39
+set profile(bagel.indexdata.dk,queryCCL) 0
+set profile(bagel.indexdata.dk,queryRPN) 1
+set profile(bagel.indexdata.dk,recentNews) {}
+set profile(bagel.indexdata.dk,smallSetUpperBound) 0
+set profile(bagel.indexdata.dk,targetInfoName) Zebra
+set profile(bagel.indexdata.dk,timeDefine) {}
+set profile(bagel.indexdata.dk,timeLastExplain) 897483464
+set profile(bagel.indexdata.dk,timeLastInit) 897483464
+set profile(bagel.indexdata.dk,welcomeMessage) {}
+set profile(bagel.indexdata.dk,windowNumber) 4
set profile(bagel9999,authentication) {}
set profile(bagel9999,comstack) tcpip
set profile(bagel9999,databases) Default
set profile(bagel9999,timeLastExplain) {}
set profile(bagel9999,timeLastInit) 891524781
set profile(bagel9999,welcomeMessage) {}
-set profile(bagel9999,windowNumber) 9
+set profile(bagel9999,windowNumber) 10
set profile(dranet,authentication) {}
set profile(dranet,comstack) tcpip
set profile(dranet,databases) drewdb
set profile(dranet,timeLastExplain) {}
set profile(dranet,timeLastInit) 887289573
set profile(dranet,welcomeMessage) {}
-set profile(dranet,windowNumber) 6
+set profile(dranet,windowNumber) 7
set profile(libris,authentication) {}
set profile(libris,comstack) tcpip
set profile(libris,databases) libr
set profile(libris,timeLastExplain) {}
set profile(libris,timeLastInit) 887285394
set profile(libris,welcomeMessage) {}
-set profile(libris,windowNumber) 5
+set profile(libris,windowNumber) 6
set profile(madison,authentication) {}
set profile(madison,comstack) tcpip
set profile(madison,databases) madison
set profile(madison,timeLastExplain) {}
set profile(madison,timeLastInit) 887289602
set profile(madison,welcomeMessage) {}
-set profile(madison,windowNumber) 10
+set profile(madison,windowNumber) 11
set profile(pica,authentication) {}
set profile(pica,comstack) tcpip
set profile(pica,databases) {IR-Explain-1 NCC-IBL OLC}
set profile(zno,timeLastExplain) {}
set profile(zno,timeLastInit) 891593773
set profile(zno,welcomeMessage) {}
-set profile(zno,windowNumber) 13
+set profile(zno,windowNumber) 14
set profile(ztest9999,authentication) {}
set profile(ztest9999,comstack) tcpip
-set profile(ztest9999,databases) {books gils}
+set profile(ztest9999,databases) {Default IR-Explain-1}
set profile(ztest9999,description) {YAZ server on localhost}
set profile(ztest9999,descripton) {This target is not a target with real bibliographic record - it just illustrates how Explain data might look like.}
set profile(ztest9999,host) localhost
set profile(ztest9999,idAuthentication) {}
set profile(ztest9999,largeSetLowerBound) 2
-set profile(ztest9999,maxResultSets) 100
-set profile(ztest9999,maxResultSize) 100000
-set profile(ztest9999,maxTerms) 50
+set profile(ztest9999,maxResultSets) {}
+set profile(ztest9999,maxResultSize) {}
+set profile(ztest9999,maxTerms) {}
set profile(ztest9999,maximumRecordSize) 50000
set profile(ztest9999,mediumSetPresentNumber) 0
-set profile(ztest9999,multipleDatabases) 0
+set profile(ztest9999,multipleDatabases) 1
set profile(ztest9999,namedResultSets) 1
set profile(ztest9999,port) 9999
set profile(ztest9999,preferredMessageSize) 30000
set profile(ztest9999,protocol) Z39
set profile(ztest9999,queryCCL) 0
set profile(ztest9999,queryRPN) 1
-set profile(ztest9999,recentNews) {strings { language {text {We've just added targetInfo, databaseInfo and attributeDetails}} } }
+set profile(ztest9999,recentNews) {}
set profile(ztest9999,smallSetUpperBound) 0
-set profile(ztest9999,targetInfoName) {Zebra server Explain test}
+set profile(ztest9999,targetInfoName) Zebra
set profile(ztest9999,timeDefine) 878567355
-set profile(ztest9999,timeLastExplain) 891651588
-set profile(ztest9999,timeLastInit) 891651588
-set profile(ztest9999,welcomeMessage) Welcome!
-set profile(ztest9999,windowNumber) 14
+set profile(ztest9999,timeLastExplain) 897392133
+set profile(ztest9999,timeLastInit) 897392253
+set profile(ztest9999,welcomeMessage) {}
+set profile(ztest9999,windowNumber) 15
set queryTypes {Simple phrase}
set queryButtons {{{I 3} {I 0} {I 0}} {{I 0} {I 1} {I 0}}}
set queryInfo {{{Title {1=4}} {Author {1=1}} {Subject {1=21}} {Any {1=1016}} {Query 1=1016 2=102} {Title-rank 1=4 2=102} {Date/time 1=1012} {Title-regular 1=4 2=3 4=2 5=102} {Ranked 1=1016 2=102 3=3 4=1 6=1}} {{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 {}}}}